8000 [WDT] added documentation link by Tobion · Pull Request #4140 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WDT] added documentation link #4140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2012
Merged

[WDT] added documentation link #4140

merged 1 commit into from
May 11, 2012

Conversation

Tobion
Copy link
Contributor
@Tobion Tobion commented Apr 27, 2012

This adds a documentation link in the WDT for the appropriate branch according to the current symfony version.
@weaverryan there is no documentation branch yet for the currently created 2.1 branch.
Also it might be a nice feature to redirect the dev branch to master automatically on the website. I.e. http://symfony.com/doc/2.1/index.html -> http://symfony.com/doc/master/index.html
@fabpot It might be a good idea to introduce a Kernel::BRANCH constant. So there would be no need to extract the branch from the symfony version in ConfigDataCollector. And bumping new versions/branches would be in one place.

@vicb
Copy link
Contributor
vicb commented Apr 27, 2012

Maybe the documentation server should redirect to the right version according to Kernel::VERSION (i.e. using rewritting) ?

@Tobion
Copy link
Contributor Author
Tobion commented Apr 27, 2012

That would be best yes.

@fabpot
Copy link
Member
fabpot commented May 10, 2012

FYI, I've added some more constants about the Symfony version: 48099a8 (modeled after PHP constants)

@fabpot
Copy link
Member
fabpot commented May 10, 2012

I've just updated the website to accept any HttpKernel::VERSION string. Some redirection examples:

  • 2.0.12 -> current
  • 2.0 -> current
  • 2.0.12-DEV -> current
  • 2.1 -> master
  • 2.1.0-DEV -> master

$this->data = array(
'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'symfony_doc' => "http://symfony.com/doc/$branch/index.html",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now simplify this with just sprintf('http://symfony.com/doc/$branch/index.html', Kernel::VERSION)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even better, just remove the symfony_doc data as we already have the version in symfony_version and move the URL directly into the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Tobion
Copy link
Contributor Author
Tobion commented May 10, 2012

👍 for updating the website. But I think you missed to return 404 for a non-existent main doc page.
http://symfony.com/doc/2.4/book/controller.html -> 404 as expected
http://symfony.com/doc/2.4/index.html -> does not return 404 (and all links there are dead)

@travisbot
Copy link

This pull request passes (merged 04adf361 into a01dec0).

@fabpot
Copy link
Member
fabpot commented May 10, 2012

I've fixed the doc index for non-existing versions. Can you squash your commits before I merge? Thanks.

the doc server redirects to the correct branch according to the symfony version
@Tobion
Copy link
Contributor Author
Tobion commented May 10, 2012

done

@travisbot
Copy link

This pull request passes (merged 709be4b into fae4523).

fabpot added a commit that referenced this pull request May 11, 2012
Commits
-------

709be4b [WDT] added documentation link

Discussion
----------

[WDT] added documentation link

This adds a documentation link in the WDT for the appropriate branch according to the current symfony version.
@weaverryan there is no documentation branch yet for the currently created 2.1 branch.
Also it might be a nice feature to redirect the dev branch to master automatically on the website. I.e. `http://symfony.com/doc/2.1/index.html` -> `http://symfony.com/doc/master/index.html`
@fabpot It might be a good idea to introduce a `Kernel::BRANCH` constant. So there would be no need to extract the branch from the symfony version in `ConfigDataCollector`. And bumping new versions/branches would be in one place.

---------------------------------------------------------------------------

by vicb at 2012-04-27T14:17:07Z

Maybe the documentation server should redirect to the right version according to `Kernel::VERSION` (i.e. using rewritting) ?

---------------------------------------------------------------------------

by Tobion at 2012-04-27T14:31:49Z

That would be best yes.

---------------------------------------------------------------------------

by fabpot at 2012-05-10T06:03:45Z

FYI, I've added some more constants about the Symfony version: 48099a8 (modeled after PHP constants)

---------------------------------------------------------------------------

by fabpot at 2012-05-10T07:08:57Z

I've just updated the website to accept any `HttpKernel::VERSION` string. Some redirection examples:

 * 2.0.12 -> current
 * 2.0 -> current
 * 2.0.12-DEV -> current
 * 2.1 -> master
 * 2.1.0-DEV -> master

---------------------------------------------------------------------------

by Tobion at 2012-05-10T12:49:16Z

:thumbsup: for updating the website. But I think you missed to return 404 for a non-existent main doc page.
http://symfony.com/doc/2.4/book/controller.html -> 404 as expected
http://symfony.com/doc/2.4/index.html -> does not return 404 (and all links there are dead)

---------------------------------------------------------------------------

by travisbot at 2012-05-10T15:12:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1296057) (merged 04adf361 into a01dec0).

---------------------------------------------------------------------------

by fabpot at 2012-05-10T17:21:06Z

I've fixed the doc index for non-existing versions. Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by Tobion at 2012-05-10T22:49:18Z

done

---------------------------------------------------------------------------

by travisbot at 2012-05-10T22:52:13Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1300414) (merged 709be4b into fae4523).
@fabpot fabpot merged commit 709be4b into symfony:master May 11, 2012
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
Commits
-------

709be4b [WDT] added documentation link

Discussion
----------

[WDT] added documentation link

This adds a documentation link in the WDT for the appropriate branch according to the current symfony version.
@weaverryan there is no documentation branch yet for the currently created 2.1 branch.
Also it might be a nice feature to redirect the dev branch to master automatically on the website. I.e. `http://symfony.com/doc/2.1/index.html` -> `http://symfony.com/doc/master/index.html`
@fabpot It might be a good idea to introduce a `Kernel::BRANCH` constant. So there would be no need to extract the branch from the symfony version in `ConfigDataCollector`. And bumping new versions/branches would be in one place.

---------------------------------------------------------------------------

by vicb at 2012-04-27T14:17:07Z

Maybe the documentation server should redirect to the right version according to `Kernel::VERSION` (i.e. using rewritting) ?

---------------------------------------------------------------------------

by Tobion at 2012-04-27T14:31:49Z

That would be best yes.

---------------------------------------------------------------------------

by fabpot at 2012-05-10T06:03:45Z

FYI, I've added some more constants about the Symfony version: 48099a8 (modeled after PHP constants)

---------------------------------------------------------------------------

by fabpot at 2012-05-10T07:08:57Z

I've just updated the website to accept any `HttpKernel::VERSION` string. Some redirection examples:

 * 2.0.12 -> current
 * 2.0 -> current
 * 2.0.12-DEV -> current
 * 2.1 -> master
 * 2.1.0-DEV -> master

---------------------------------------------------------------------------

by Tobion at 2012-05-10T12:49:16Z

:thumbsup: for updating the website. But I think you missed to return 404 for a non-existent main doc page.
http://symfony.com/doc/2.4/book/controller.html -> 404 as expected
http://symfony.com/doc/2.4/index.html -> does not return 404 (and all links there are dead)

---------------------------------------------------------------------------

by travisbot at 2012-05-10T15:12:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1296057) (merged 04adf361 into a01dec0).

---------------------------------------------------------------------------

by fabpot at 2012-05-10T17:21:06Z

I've fixed the doc index for non-existing versions. Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by Tobion at 2012-05-10T22:49:18Z

done

---------------------------------------------------------------------------

by travisbot at 2012-05-10T22:52:13Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1300414) (merged 709be4b into fae4523).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0