Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy#31108

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.2
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31092,#31025
LicenseMIT
Doc PR-

This allows defining a translator that implements only the new interface and use it with ValidatorBuilder.

ping@dvdknaap,@snebes since you were affected.

dvdknaap reacted with thumbs up emoji
Copy link

@snebessnebes left a comment
edited
Loading

Choose a reason for hiding this comment

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

This change corrects the error I was getting. Thank you!

@fabpotfabpot merged commita12656e intosymfony:4.2Apr 17, 2019
fabpot pushed a commit that referenced this pull requestApr 17, 2019
…or with LegacyTranslatorProxy (nicolas-grekas)This PR was merged into the 4.2 branch.Discussion----------[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy| Q             | A| ------------- | ---| Branch?       | 4.2| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31092,#31025| License       | MIT| Doc PR        | -This allows defining a translator that implements only the new interface and use it with ValidatorBuilder.ping@dvdknaap,@snebes since you were affected.Commits-------a12656e [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
@fabpotfabpot mentioned this pull requestApr 17, 2019
@Gemorroj
Copy link
Contributor

"require": {"php":"^7.2","ext-ctype":"*","ext-iconv":"*","ext-apcu":"*","ext-pdo_pgsql":"*","ext-curl":"*","ext-json":"*","ext-soap":"*","ext-intl":"*","symfony/console":"4.2.*","symfony/dotenv":"4.2.*","symfony/flex":"^1.1","symfony/framework-bundle":"4.2.*","symfony/yaml":"4.2.*","symfony/orm-pack":"*","symfony/validator":"4.2.*","symfony/security-bundle":"4.2.*","symfony/intl":"4.2.*","symfony/form":"4.2.*","symfony/serializer":"4.2.*","symfony/monolog-bundle":"^3.3","misd/phone-number-bundle":"^2.0@dev","nelmio/api-doc-bundle":"^3.4","nelmio/cors-bundle":"^1.5","lexik/jwt-authentication-bundle":"^2.6","martin-georgiev/postgresql-for-doctrine":"^1.1","fresh/doctrine-enum-bundle":"^6.2","barbieswimcrew/zip-code-validator":"^1.3","symfony/swiftmailer-bundle":"^3.2","symfony/twig-bundle":"4.2.*","shapecode/cron-bundle":"^3.2.3","pagerfanta/pagerfanta":"^2.0","wsdltophp/packagegenerator":"^3.2","wsdltophp/wssecurity":"^1.2"    },"require-dev": {"symfony/maker-bundle":"^1.7","symfony/debug-bundle":"4.2.*","easycorp/easy-log-handler":"^1.0.5","phpstan/phpstan-symfony":"^0.10","phpstan/phpstan-phpunit":"^0.10","friendsofphp/php-cs-fixer":"^2.13"    },

after update

 [KO]Script cache:clear returned with error code 255!!  !!  Fatal error: Interface 'Symfony\Component\Translation\TranslatorInterface' not found in S:\OSPanel\domains\saas-shipping-backend.loc\vendor\symfony\validator\Util\LegacyTranslatorProxy.php on line 21!!  !!  In LegacyTranslatorProxy.php line 21:!!                                                                                                       !!    Attempted to load interface "TranslatorInterface" from namespace "Symfony\Component\Translation".  !!    Did you forget a "use" statement for "Symfony\Contracts\Translation\TranslatorInterface"?          !!                                                                                                       !!  !!  Script @auto-scripts was called via post-update-cmd

@Gemorroj
Copy link
Contributor

Gemorroj commentedApr 17, 2019
edited
Loading

temporary add to requirements"symfony/translation": "4.2.*", to fix this

KiszNa, robregonm, Alexbeis, ChuGui, nissen-chris, milosa, dzamyatin, PaulCombal, ashish8488, StrangeletC, and 4 more reacted with thumbs up emojiCryde, bilipp, AlvarezCasarez, saiht, la-costa, and dwasil reacted with heart emoji

@leonexcc
Copy link

This breaks Contao (https://github.com/contao/contao) 4.7.4 in combination with symfony/validator (v4.2.7):

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\Validator\Util\LegacyTranslatorProxy::__construct() must implement interface Symfony\Contracts\Translation\TranslatorInterface, instance of Contao\CoreBundle\Translation\Translator given,....

The Contao translator still implements the legacy interface and is blindly wrapped into the proxy. With symfony/framework-bundle v4.2.6 everything workes fine.

@nicolas-grekas
Copy link
MemberAuthor

See#31152

sdaoudi reacted with thumbs up emoji

@sdaoudi
Copy link

Thanks@nicolas-grekas

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrchalasr approved these changes

+3 more reviewers

@snebessnebessnebes approved these changes

@SimperfitSimperfitSimperfit approved these changes

@joseneto29joseneto29joseneto29 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

10 participants

@nicolas-grekas@Gemorroj@leonexcc@sdaoudi@snebes@Simperfit@chalasr@joseneto29@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp