-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Changed Route vars to protected #18701
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
Conversation
…_DEPRECATIONS_HELPER (nicolas-grekas) This PR was merged into the 3.1-dev branch. Discussion ---------- [Bridge\PhpUnit] Add "disabled" mode to SYMFONY_DEPRECATIONS_HELPER | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#18222 | License | MIT | Doc PR | - See https://github.com/symfony/symfony/pull/18232/files?w=1 Because we keep adding features to the bridge, so that one could want some features but not the deprecations helper. In weak mode, this PR also disables colors. Fetching the SYMFONY_DEPRECATIONS_HELPER env var is also done lazily to workaround old phpunit versions affected by sebastianbergmann/phpunit#1216 Commits ------- 64fe539 [Bridge\PhpUnit] Add "disabled" mode to SYMFONY_DEPRECATIONS_HELPER
… anonymous in ContextListener (WouterJ) This PR was squashed before being merged into the 3.1-dev branch (closes symfony#18211). Discussion ---------- [Security] Use auth trust resolver to determine anonymous in ContextListener | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | not done yet There is a nice class in Symfony that is used to check whether a token is anonymously: `AuthenticationTrustResolver`. However, its logic was still hard coded in the `ContextListener`, making it impossible to customize it (e.g. using another anonymous token class). I think it makes lots of sense to use the dedicated class. Commits ------- ab5578e [Security] Use auth trust resolver to determine anonymous in ContextListener
* 2.8: [ci] Tweak scripts
* 3.0: [ci] Tweak scripts Conflicts: appveyor.yml
This PR was merged into the 3.1-dev branch. Discussion ---------- use class constants instead of FQCN strings | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#18211 (comment) | License | MIT | Doc PR | Commits ------- d4ec7dd use class constants instead of FQCN strings
…RedisAdapter::doSave) (masterklavi) This PR was squashed before being merged into the 3.1-dev branch (closes symfony#18248). Discussion ---------- Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave) | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- e132763 Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave)
* 2.8: move test methods to test case class
Add missing public method stubs to `TestController` (all methods in the base `Controller` class from the FrameworkBundle are `protected` since Symfony 3.0).
This PR was merged into the 3.0 branch. Discussion ---------- fix controller tests | Q | A | ------------- | --- | Branch? | 3.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | items 9 to 12 from sebastianbergmann/phpunit-mock-objects#299 (comment) | License | MIT | Doc PR | Add missing public method stubs to `TestController` (all methods in the base `Controller` class from the FrameworkBundle are `protected` since Symfony 3.0). Commits ------- fb963d2 fix controller tests
* 3.0: fix controller tests move test methods to test case class
This PR was merged into the 3.0 branch. Discussion ---------- [3.0] fix mocking of some methods | Q | A | ------------- | --- | Branch? | 3.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | items 1 and 2 of sebastianbergmann/phpunit-mock-objects#299 (comment) | License | MIT | Doc PR | Commits ------- 07308e9 [3.0] fix mocking of some methods
…(HeahDude) This PR was merged into the 3.0 branch. Discussion ---------- [Form] Remove unused legacy code in `ChoiceType` | Q | A | ------------- | --- | Branch? | 3.0 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | - Commits ------- 8af78e9 [Form] Remove unused legacy code in `ChoiceType`
…Dude) This PR was merged into the 3.0 branch. Discussion ---------- [Form] Fix `FormBuilderInterface` docblocks | Q | A | ------------- | --- | Branch? | 3.0 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#18301 | License | MIT | Doc PR | - Commits ------- 67458d8 [Form] Fix `FormBuilderInterface` docblocks
…er Bex) This PR was merged into the 3.1-dev branch. Discussion ---------- Make Request::isFromTrustedProxy() public. | Q | A | ------------- | --- | Branch | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | When adding custom headers to your proxy (in our particular case, a `X-Base-Url` header, but it could be anything), it is necessary to be able to tell whether the request came from a trusted proxy or not. Unfortunately, currently the `isFromTrustedProxy()` method is private, which means you'll need to subclass `Request` and add your own *differently named* method just to be able to access this information. This functionality is pretty straightforward, and I don't see a reason to keep this method private so this a trivial pull request to make it public (and it adds a comment so it'll show up in the API docs with proper documentation). Commits ------- 286f64f Make Request::isFromTrustedProxy() public.
…ace autowirable (dunglas) This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle][TwigBundle] Make EngineInterface autowirable | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 26ed582 [FrameworkBundle][TwigBundle] Make EngineInterface autowirable
…ts name is the class name (dunglas) This PR was squashed before being merged into the 3.1-dev branch (closes symfony#18289). Discussion ---------- [FrameworkBundle] Return the invokable service if its name is the class name | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a if a service is invokable and has the same name than its class name, the controller resolver of FrameworkBundle doesn't retrieve the service and tries to construct a new instance of the class instead. This is a very rare edge case, but this fix is useful for dunglas/DunglasActionBundle#36: referencing auto-registered controllers following the ADR style in YAML and XML routing files will be more intuitive. Currently: `defaults: { _controller: 'Your\Action\FQN:__invoke' }`, after this fix: `defaults: { _controller: 'Your\Action\FQN' }`. This PR also fix a currently useless test. Commits ------- 70b9309 [FrameworkBundle] Return the invokable service if its name is the class name
…(xabbuh) This PR was merged into the 3.1-dev branch. Discussion ---------- [Guard] fix minimum required Seucirty Http version | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#17714 | License | MIT | Doc PR | Otherwise, the `TargetPathTrait` is not available. Commits ------- 952bf01 [Guard] fix minimum required Seucirty Http version
* 2.8: improved comment [FileSystem] Add support for Google App Engine. [2.8] fix mocks [Form] Fix BC break introduced in symfony#14403
…(nicolas-grekas) This PR was merged into the 3.1-dev branch. Discussion ---------- [Cache] Add DSN based Redis connection factory | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Required by symfony#18667 Commits ------- 3073efb [Cache] Add DSN based Redis connection factory
This PR was merged into the 3.1-dev branch. Discussion ---------- [Cache] Cleanups | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 9a56498 [Cache] Cleanups
released v3.0.5
…hnchen) This PR was merged into the 3.1-dev branch. Discussion ---------- add @event annotation for AuthenticationEvents | Q | A | ------------- | --- | Branch | 2.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#18684 | License | MIT split of symfony#18684 for targeting 2.3 branch Commits ------- e2c1270 add @event annotation for AuthenticationEvents
* 2.8: add @event annotation for AuthenticationEvents bumped Symfony version to 2.8.6 [PropertyInfo] PHPDoc correction add @event annotation for KernelEvents updated VERSION for 2.8.5 updated CHANGELOG for 2.8.5 bumped Symfony version to 2.7.13 updated VERSION for 2.7.12 update CONTRIBUTORS for 2.7.12 updated CHANGELOG for 2.7.12 bumped Symfony version to 2.3.41 updated VERSION for 2.3.40 update CONTRIBUTORS for 2.3.40 updated CHANGELOG for 2.3.40 Revert "minor symfony#18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)" Revert "fixed CS" fixed deprecation notices in tests [Security] Normalize "symfony/security-acl" dependency versions across all composer.json files [FrameworkBundle] Remove misleading comment bug symfony#17460 [DI] fix ambiguous services schema
* 3.0: (24 commits) add @event annotation for AuthenticationEvents bumped Symfony version to 3.0.6 updated VERSION for 3.0.5 updated CHANGELOG for 3.0.5 bumped Symfony version to 2.8.6 [PropertyInfo] PHPDoc correction add @event annotation for KernelEvents Fixed typo updated VERSION for 2.8.5 updated CHANGELOG for 2.8.5 bumped Symfony version to 2.7.13 updated VERSION for 2.7.12 update CONTRIBUTORS for 2.7.12 updated CHANGELOG for 2.7.12 bumped Symfony version to 2.3.41 updated VERSION for 2.3.40 update CONTRIBUTORS for 2.3.40 updated CHANGELOG for 2.3.40 Revert "minor symfony#18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)" Revert "fixed CS" ...
Features are merged in |
@Ener-Getick Well, I'm not even sure it's a feature. I just put yes because I didn't want to say no for all of them. |
And I think it would be better to add an optional parameter |
Interesting about the BC support, I didn't consider that. Could you explain why making them protected affects the BC? Ok, I can change to master, however, if this merge isn't on 2.8, then it wouldn't work to well for silex. My goal for this PR is to fix this issue in silex. So if we could come up with a way to do that, that'd be great. |
@Ener-Getick There is no BC break at changing from private to protected. |
but it then forces us to maintain BC on any protected property, which is a much bigger maintenance task (BC on protected stuff is the harder stuff btw). So for sure, this will not be accepted in 2.8 or 3.0. And it cannot be accepted in master without a valid use case for which the core team thinks that inheritance is the right way to handle it (hint: most of the time, it is not the case) |
@GromNaN I didn't mean a BC break, I meant we won't be able to remove this parameters or change their name for example. |
to be clear, I'm putting a 👎 vote on this PR in its current state |
Ah, ok @Ener-Getick I understand what you are saying. Adding a parameter would be a better solution. However, that would be a feature, but I guess that feature could be merged in 2.8 right? |
@ragboyjr old branches only accept bug fixes |
True True, it'd have to be a patch for it to be in 2.8... |
Added a trim flag to Route::setPath in order to allow paths to be set as is without any trimming to sanitize the input Signed-off-by: RJ Garcia <[email protected]>
b698647
to
3848120
Compare
Let me close this and try again. |
Updated all of the route variables to be protected in order to allow useful extension of Route class. This is related to silexphp/Silex#149. We'd need this merged in before we can properly extend and update the Route class.
Also, I'm not 100% sure 2.8 is the best branch for this, but I know silex (recently) uses a min version of 2.8 for Symfony
Signed-off-by: RJ Garcia [email protected]