Skip to content
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

Move getter from TaggedAdminInterface to AdminInterface #6713

Merged
merged 6 commits into from
Jan 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ parameters:

-
# will be fixed in v4. Currently BC break
message: "#^Method Sonata\\\\AdminBundle\\\\Translator\\\\Extractor\\\\JMSTranslatorBundle\\\\AdminExtractor\\:\\:buildSecurityInformation\\(\\) should return array\\<string, mixed\\> but return statement is missing\\.$#"
message: "#^Method Sonata\\\\AdminBundle\\\\Translator\\\\Extractor\\\\JMSTranslatorBundle\\\\AdminExtractor\\:\\:buildSecurityInformation\\(\\) should return array\\<string, array<string>\\> but return statement is missing\\.$#"
count: 1
path: src/Translator/Extractor/JMSTranslatorBundle/AdminExtractor.php

Expand Down
13 changes: 4 additions & 9 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public function validate(ErrorElement $errorElement, $object)
}

/**
* @final since sonata-admin/admin-bundle 3.x
* @final since sonata-admin/admin-bundle 3.84
*/
public function initialize()
{
Expand Down Expand Up @@ -1177,12 +1177,12 @@ public function generateObjectUrl($name, $object, array $parameters = [], $refer

public function generateUrl($name, array $parameters = [], $referenceType = RoutingUrlGeneratorInterface::ABSOLUTE_PATH)
{
return $this->routeGenerator->generateUrl($this, $name, $parameters, $referenceType);
return $this->getRouteGenerator()->generateUrl($this, $name, $parameters, $referenceType);
}

public function generateMenuUrl($name, array $parameters = [], $referenceType = RoutingUrlGeneratorInterface::ABSOLUTE_PATH)
{
return $this->routeGenerator->generateMenuUrl($this, $name, $parameters, $referenceType);
return $this->getRouteGenerator()->generateMenuUrl($this, $name, $parameters, $referenceType);
}

final public function setTemplateRegistry(MutableTemplateRegistryInterface $templateRegistry): void
Expand Down Expand Up @@ -2122,7 +2122,7 @@ public function getClassnameLabel()
if (null === $this->classnameLabel) {
// NEXT_MAJOR: Remove this deprecation and uncomment the following exception
@trigger_error(sprintf(
'Calling %s() when no classname label is set is deprecated since sonata-project/admin-bundle 3.x'
'Calling %s() when no classname label is set is deprecated since sonata-project/admin-bundle 3.84'
.' and will throw a LogicException in 4.0',
__METHOD__,
), E_USER_DEPRECATED);
Expand Down Expand Up @@ -2587,11 +2587,6 @@ public function getObjectMetadata($object)
return new Metadata($this->toString($object));
}

public function getListModes()
{
return $this->listModes;
}

public function setListMode($mode)
{
if (!$this->hasRequest()) {
Expand Down
8 changes: 1 addition & 7 deletions src/Admin/AdminInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
* @method void defineFormBuilder(FormBuilderInterface $formBuilder)
*
* @phpstan-template T of object
* @phpstan-extends TaggedAdminInterface<T>
* @phpstan-extends AccessRegistryInterface<T>
* @phpstan-extends UrlGeneratorInterface<T>
* @phpstan-extends LifecycleHookProviderInterface<T>
Expand Down Expand Up @@ -382,7 +381,7 @@ public function getDataSourceIterator();
/**
* NEXT_MAJOR: Remove this method.
*
* @deprecated since sonata-admin/admin-bundle 3.x
* @deprecated since sonata-admin/admin-bundle 3.84
*
* @return void
*/
Expand Down Expand Up @@ -698,11 +697,6 @@ public function getTranslationLabel($label, $context = '', $type = '');
*/
public function getObjectMetadata($object);

/**
* @return array<string, array<string, mixed>>
*/
public function getListModes();

/**
* Check the current request is given route or not.
*
Expand Down
Loading