-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix wrong roles comparison #35942
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
Closed
Closed
Fix wrong roles comparison #35942
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…(jdufresne) This PR was submitted for the 4.4 branch but it was merged into the 5.1-dev branch instead (closes symfony#33003). Discussion ---------- [Filesystem] Add $suffix argument to tempnam() | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#33002 | License | MIT | Doc PR | symfony/symfony-docs#12108 **Description** The `tempnam()` interface was previously: ```php tempnam($dir, $prefix) ``` This adds a third argument, `$suffix`, that is appended to the filename after the random component. This defaults to `''` for backwards compatibility. This is quite useful when the temporary file is consumed for a specific purpose that expects a suffix. **Example** ```php $filesystem->tempnam('/tmp', 'prefix_', '.png'); ``` Would create a file like: `/tmp/prefix_abcd1234.png`. Commits ------- ef12069 [Filesystem] Add $suffix argument to tempnam()
* 4.4: Fix CS Fix CS
This PR was merged into the 5.0 branch. Discussion ---------- Fix CS | Q | A | ------------- | --- | Branch? | 5.0 <!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | n/a Commits ------- f64f59a Fix CS
* 5.0: Fix CS Fix CS Fix CS
* 5.0: Fix bad merge
…enabled locales (javiereguiluz) This PR was merged into the 5.1-dev branch. Discussion ---------- [Translation] Introduce a way to configure the enabled locales | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#31563 | License | MIT | Doc PR | - This implements the idea symfony#31563 so we can decide if we want to add this or not. I tested it in the "Symfony Demo" app. Before: 107 catalogs created in cache/dev/translations/. After: 43 catalogs. But that's because the app is translated into lots of languages. In most cases, only 2 catalog files will be generated (vs 107 before). If this idea is approved, I'll add tests and docs. Thanks. Commits ------- 7658434 [Translation] Introduce a way to configure the enabled locales
* 4.4: cs fix
* 4.4: Escape variable in Exception Template
* 5.0: cs fix Escape variable in Exception Template
This PR was merged into the 5.1-dev branch. Discussion ---------- [Cache] Add couchbase cache adapter | Q | A | ------------- | --- | Branch? | 4.4 for features | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#32038 | License | MIT | Doc PR | symfony/symfony-docs#11748 Add new cache adapter to be able using Couchbase as cache system. Commits ------- 1ae7dd5 [Cache] Add couchbase cache adapter
…()'s call (chalasr) This PR was merged into the 5.1-dev branch. Discussion ---------- [Mailer] Fix MandrillHttpTransport::getRecipients()'s call | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Should make the CI green. Commits ------- f88d1bb [Mailer] Fix MandrillHttpTransport::getRecipients()'s call
…OTIFY (dunglas) This PR was squashed before being merged into the 5.1-dev branch (closes symfony#35485). Discussion ---------- [Messenger] Add support for PostgreSQL LISTEN/NOTIFY | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a | License | MIT | Doc PR | todo PostgreSQL comes with a builtin, performant, scalable and transactional pub/sub system called [`LISTEN`/`NOTIFY`](https://www.postgresql.org/docs/current/sql-notify.html). This PR allows to leverage this mechanism when using the Messenger component with Postgres. When the Postgres is used, workers are notified in real-time when a message is dispatched. This reduces the latency, and prevents the worker from executing useless SQL queries. Basically, it allows to switch from a polling-based approach to an event-based one. This patch can be used with all existing installation of Messenger, as long as the underlying DBMS is Postgres. For many (most ?) projects, it allows to get the benefits of using a queue system such as RabbitMQ or Pulsar without having to introduce new services to monitor, replicate or upgrade. If PostgreSQL is used, `LISTEN`/`NOTIFY` is used automatically! That's all! It's also possible to configure how long the worker must wait for new messages: ```yaml framework: messenger: transports: async: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' options: pgsql_get_notify: true pgsql_get_notify_timeout: 500 ``` Then you can use start the workers with something like: `php bin/console messenger:consume --sleep=0` A demo app using this new feature is available in this repository: https://github.com/dunglas/demo-postgres-listen-notify TODO: * [ ] Add tests Commits ------- 01f33c3 [Messenger] Add support for PostgreSQL LISTEN/NOTIFY
…` (lyrixx) This PR was merged into the 5.1-dev branch. Discussion ---------- Extracted code to expand an URI to `UriExpander` | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | When building a crawler we need to extract and to expand all links on a web pages. ATM, we need to create a DomDocument, attach the href, and ask for the full URL. This is a bit slow, and unecessary. This is why I extracted the minimal code to expand the URL to its onw trait for better re-usability. I benched (a specific part of) my application: * before: 2.16ms * after: 1.42ms Commits ------- 0c499c6 Extracted code to expand an URI to `UriExpanderTrait`
…ssage::fromNotification() (fancyweb) This PR was merged into the 5.1-dev branch. Discussion ---------- [Notifier] Remove superfluous parameters in *Message::fromNotification() | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Those classes are final so I think we don't need those extra arguments. Commits ------- d0dacf5 [Notifier] Remove superfluous parameters in *Message::fromNotification()
…outes' default "_locale" requirement
…led_locales to build routes' default "_locale" requirement (nicolas-grekas) This PR was merged into the 5.1-dev branch. Discussion ---------- [FrameworkBundle] use framework.translator.enabled_locales to build routes' default "_locale" requirement | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - No need to configure the same requirements for `_locale` in all routes any more thanks to the `framework.translator.enabled_locales` config option introduced in symfony#32433. Commits ------- 5eebd37 [FrameworkBundle] use framework.translator.enabled_locales to build routes' default "_locale" requirement
…KernelTestCase (adrienfr) This PR was merged into the 5.1-dev branch. Discussion ---------- [FrameworkBundle] Use MailerAssertionsTrait in KernelTestCase | Q | A | ------------- | --- | Branch? | 4.4+ | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix symfony#35510 | License | MIT | Doc PR | Since 4.4, we have new PHPUnit constraints for the mailer component, but these are only available with `WebTestCase` and not `KernelTestCase`. I think this would be useful to access these constraints from both TestCase. I don't know if I should move these [tests](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/MailerTest.php) or add new ones only for `KernelTestCase`? Commits ------- 1b1ab29 [FrameworkBundle] Use MailerAssertionsTrait in KernelTestCase
This PR was merged into the 5.1-dev branch. Discussion ---------- [Validator] add Japanese translation | Q | A | ------------- | --- | Branch? | master<!-- see below --> | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | -<!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | -<!-- required for new features --> I added a Japanese translation, taking into account existing translations. Commits ------- 90104a9 [Validator] add Japanese translation
…guide (wouterj) This PR was merged into the 5.1-dev branch. Discussion ---------- Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a I forgot to update the UPGRADE guides in symfony#35858 Commits ------- 3c8d316 Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide
This PR was merged into the 5.1-dev branch. Discussion ---------- [Routing] Add stateless route attribute | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Ticket | https://github.com/orgs/symfony/projects/1#card-30506005 | License | MIT | Doc PR | TODO On top of symfony#35732 Add a stateless attribute for: Routes in annotations ``` @route(stateless=true) ``` Yaml ```yml route: stateless: true ``` Xml ```xml <route stateless="true" /> ``` PHP configurator ```php $route->stateless(true); ``` That stateless attribute is a shortcut for setting `_stateless` default attribute in route. Commits ------- 2da68ba [Routing] Add stateless route attribute
…ilouloute) This PR was merged into the 5.1-dev branch. Discussion ---------- [ExpressionLanguage] Fixed exception message | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 4d695b3 [ExpressionLanguage] Fixed exception message
* 4.4: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
* 5.0: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [5.0] Remove some unused variables [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
released v5.0.5
…y ldap (Victor Garcia) This PR was squashed before being merged into the 5.1-dev branch. Discussion ---------- [LDAP] Add error code in exceptions generated by ldap | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? |no | Deprecations? | no | Tickets | | License | MIT | Doc PR | This PR add the exception code returned by ldap PHP component to LdapException, and allow users a better way to detect the errors. Before this LdapException allways return code 0, and make neccesary evaluate the string returned to detect the error. Commits ------- b4c90f0 [LDAP] Add error code in exceptions generated by ld 57AE ap
* 4.4: register only existing transport factories prevent deprecation being triggered from assertion bumped Symfony version to 4.4.6 updated VERSION for 4.4.5 updated CHANGELOG for 4.4.5
* 5.0: register only existing transport factories prevent deprecation being triggered from assertion bumped Symfony version to 5.0.6 updated VERSION for 5.0.5 updated CHANGELOG for 5.0.5 bumped Symfony version to 4.4.6 updated VERSION for 4.4.5 updated CHANGELOG for 4.4.5
…factories (xabbuh) This PR was merged into the 5.1-dev branch. Discussion ---------- [FrameworkBundle] register only existing transport factories | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? B41A | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#35866 | License | MIT | Doc PR | Commits ------- 24322cf register only existing transport factories
… based on Amp's HTTP client (nicolas-grekas) This PR was merged into the 5.1-dev branch. Discussion ---------- [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - This PR provides an `AmpHttpClient`, which is an adapter between [`amphp/http-client`](https://github.com/amphp/http-client) and `symfony/http-client-contracts`. ~This is an early experiment for now, but it works already on the happy path:~ I have a local h2-intensive script, and while it's slower than CurlHttpClient, this performs quite well! This could provide a portable implementation of HTTP/2 \o/ /cc @kelunik FYI Todo: - [x] async request/response - [x] streaming and multiplexing - [x] handle all ssl options - [x] timers info - [x] upload/download progress info - [x] upload/download progress callback - [x] HTTP proxy support - [x] streamed upload - [x] public-key pinning - [x] peer certificate capturing - [x] stream casting with `$response->toStream()` - [x] ~amphp/http-client#241 - [x] extensive debug info - [x] HTTP/2 PUSH support - [x] amphp/http-client#243 - [x] amphp/http-client#242 - [x] amphp/http-client#250 - [x] amphp/http-client#239 - [x] ~kelunik/certificate#2 - [x] amphp/socket#71 - [x] amphp/http-client#252 Commits ------- ef113fe [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client
This PR was merged into the 5.1-dev branch. Discussion ---------- [String] fix failing test on PHP 8 | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - `__toString()` must be public in PHP 8. Commits ------- 0a2f7b2 [String] fix failing test on PHP 8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix wrong roles comparison.