-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Remove deprecated code #1417
Comments
is getting fixed by this: #1429 |
will be fixed by this: #1437 The Translator was the culprit |
@VincentLanglet how do i fix these two?
caused by this: SonataPageBundle/src/Admin/SharedBlockAdmin.php Lines 39 to 47 in f669175
because these are "would be" final, i can't overwrite them like that, and if i would try to set them later, i can't overwrite the cached values? |
You can override directly the protected variable Can't it do the job ? |
Yes I could set these but that doesn't work like the current function Because BaseBlockAdmin doesn't set these values they need to be calculated from class. And when they do, the cache values are set. Now setting the variable doesn't change anything because of the cache ones. for example i tried this: public function configure()
{
$this->baseRoutePattern = sprintf('%s/%s', $this->getBaseRoutePattern(), 'shared');
$this->baseRouteName = sprintf('%s/%s', $this->getBaseRouteName(), 'shared');
} which doesn't work because of cached values |
Ok, I have some questions
It will help me to find the best solutions. |
the thing is done using for why it does it to not collide with the other page admin that uses the same entity as class |
I currently doesn't see a better way than WDYT @jordisala1991 ? |
i need to run the tests for this again, but the only thing i see are the big Twig change and both of them already got PRs |
IMHO the command PR need to be restarted since we plan to
For twig there is some changes needed #1423 And if you want to help to find a solution, there is this issue #1442 |
hm the snapshotmanager uses sql instead of dql or query builder |
On Sql/dql there is this issue #1426 dunno if it's the same subject. |
yeah partly, but also the enable snapshots query |
I'm deprecating the baseCommand in my Pull request ;) |
Ok I checked again the |
The first two will need something like this on SonataAdmin 4 sonata-project/SonataAdminBundle#7867 |
the Connection thing is part of the Query rework I'm trying to do, i just need to write better testcases |
what to do with these two? the blockbundle ones can't be extended anymore. Are the page bundle ones really needed? otherwise i will think about something |
For the second class,
For the first class, the simpler solution I see is to provide an AbstractBlockContextManager in BlockBundle with everything final except |
yeah i was thinking about decoration too also PageBundle still points to 3.x Block Bundle and not 4.x, but that might be work for another PR |
Two solutions:
If it's not too much work, I prefer the second solution, this avoid a release on an old branch. |
What about:
Can you try with that? @Hanmac |
i didn't tried yet, but it doesn't work because calling getBaseRoutePattern would cache the result and then setting baseRoutePattern wouldn't have any effect |
I just tried, it cant be done without the Pr opened by @VincentLanglet . So this deprecation will be only fixed on 4.x |
I will work on those two deprecations
|
tried what? I don't get it! |
You currently cannot solve the deprecations, we need to finish and release sonata-project/SonataAdminBundle#7867. And this will only be solve in 4.x. The issue is that you cannot override
|
Yeah it's the issue, and when this PR pass, should I be able to override Edit 1: and your PR will fix all those deprecations that are missing? |
this will be fixed by #1448 |
You'll be able to override generateBaseRoutePattern. But only in the same PR than the one which bump the SonataAdmin dependency. So it's all or nothing. |
I guess it's just missing to add sonata admin 4 to solve this deprecation
|
It requires a SonataAdmin release first. |
Will be done with #1485 so we can be close this |
Remaining direct deprecation notices (6)
Allow to configure routeName and routePattern dynamically SonataAdminBundle#7867 1x: The "Sonata\AdminBundle\Admin\AbstractAdmin::getBaseRoutePattern()" method is considered final since sonata-project/admin-bundle 3.102. It may change without further notice as of its next major version. You should not extend it from "Sonata\PageBundle\Admin\SharedBlockAdmin".
1x in BaseBlockAdminTest::testSettingAsEditedOnPreBatchDeleteAction from Sonata\PageBundle\Tests\Admin
Allow to configure routeName and routePattern dynamically SonataAdminBundle#7867 1x: The "Sonata\AdminBundle\Admin\AbstractAdmin::getBaseRouteName()" method is considered final since sonata-project/admin-bundle 3.102. It may change without further notice as of its next major version. You should not extend it from "Sonata\PageBundle\Admin\SharedBlockAdmin".
1x in BaseBlockAdminTest::testSettingAsEditedOnPreBatchDeleteAction from Sonata\PageBundle\Tests\Admin
Upgrade Sonatablock and SonataSeo #1483 1x: The "Sonata\BlockBundle\Block\BlockContextManager" class is considered final since sonata-project/block-bundle 3.0. It may change without further notice as of its next major version. You should not extend it from "Sonata\PageBundle\Block\BlockContextManager".
1x in BlockContextManagerTest::testGetWithValidData from Sonata\PageBundle\Tests\Block
Upgrade Sonatablock and SonataSeo #1483 1x: The "Sonata\BlockBundle\Block\Service\ContainerBlockService" class is considered final since sonata-project/block-bundle 3.0. It may change without further notice as of its next major version. You should not extend it from "Sonata\PageBundle\Block\ContainerBlockService".
1x in ContainerBlockServiceTest::testExecute from Sonata\PageBundle\Tests\Block
Feature/1415/Decouple notification-bundle from cleanup snapshot #1434 1x: The "Sonata\PageBundle\Command\BaseCommand" class extends "Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand" that is deprecated since Symfony 4.2, use {@see Command} instead.
1x in BaseBlockAdminTest::testSettingAsEditedOnPreBatchDeleteAction from Sonata\PageBundle\Tests\Admin
SnapshotManager: use QueryBuilder #1446 1x: The "Sonata\Doctrine\Entity\BaseEntityManager::getConnection()" method is deprecated since sonata-project/sonata-doctrine-extensions 1.15 and will be removed in version 2.0. Use "getEntityManager()->getConnection()" instead.
1x in SnapshotManagerTest::testEnableSnapshots from Sonata\PageBundle\Tests\Entity
remove symfony/debug dependency #1429 8x: The "Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::getException()" method is deprecated since Symfony 4.4, use "getThrowable()" instead.
4x in ExceptionListenerTest::testInternalException from Sonata\PageBundle\Tests\Listener
3x in ExceptionListenerTest::testNotFoundException from Sonata\PageBundle\Tests\Listener
1x in ExceptionListenerTest::testNotFoundExceptionInEditorMode from Sonata\PageBundle\Tests\Listener
6x: The Sonata\AdminBundle\Admin\AbstractAdmin::trans method is deprecated since version 3.9 and will be removed in 4.0.
Fixes Validator Testcase #1437 2x: Passing a null message when instantiating a "Symfony\Component\Validator\ConstraintViolation" is deprecated since Symfony 4.4.
1x in UniqueUrlValidatorTest::testValidateWithPageFound from Sonata\PageBundle\Tests\Validator
1x in UniqueUrlValidatorTest::testValidateWithRootUrlAndNoParent from Sonata\PageBundle\Tests\Validator
1x: The Sonata\BlockBundle\Test\AbstractBlockServiceTestCase class is deprecated since sonata-project/block-bundle 3.16 and will be removed with the 4.0 release. Use Sonata\BlockBundle\Test\BlockServiceTestCase instead.
1x in ClassLoader::loadClass from Composer\Autoload
1x: Not passing argument 2 to "Sonata\AdminBundle\Admin\AbstractAdmin::setParent()" is deprecated since sonata-project/admin-bundle 3.103 and will not be allowed in 4.0.
1x in BaseBlockAdminTest::testSettingAsEditedOnPreBatchDeleteAction from Sonata\PageBundle\Tests\Admin
1x: You are trying to set entity an instance of "Mock_PageInterface_4fbe8eb3",
which is not the one registered with this admin class ("Sonata\PageBundle\Tests\Model\Page").
This is deprecated since 3.5 and will no longer be supported in 4.0.
1x in PageAdminTest::testTabMenuHasLinksWithSubSite from Sonata\PageBundle\Tests\Admin
1x: The "Sonata\AdminBundle\Admin\AbstractAdmin::buildTabMenu()" method is deprecated since sonata-project/admin-bundle 3.95 and will be removed in version 4.0.
1x in PageAdminTest::testTabMenuHasLinksWithSubSite from Sonata\PageBundle\Tests\Admin
1x: The default value of the "$secure" and "$samesite" arguments of "Symfony\Component\HttpFoundation\Cookie::__construct"'s constructor will respectively change from "false" to "null" and from "null" to "lax" in Symfony 5.0, you should define their values explicitly or use "Cookie::create()" instead.
1x in ResponseListenerTest::testPageIsEditor from Sonata\PageBundle\Tests\Listener
Deprecations related with bundles.
1x in CreateSnapshotsCommandTest::setUp from Sonata\PageBundle\Tests\Command
1x in SnapshotManagerTest::testEnableSnapshots from Sonata\PageBundle\Tests\Entity
1x in Issue1134Test::testLabelInShowAction from Sonata\PageBundle\Tests\Functional\Ticket
The text was updated successfully, but these errors were encountered: