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

[WIP] Added support for doctrine annotations #5284

Closed
wants to merge 3 commits into from

Conversation

core23
Copy link
Member

@core23 core23 commented Nov 2, 2018

I am targeting this branch, because {reason}.

Changelog

### Added
- Added support for doctrine annotations

To do

  • Update the tests
  • Add an upgrade note
  • Test it on a real project

Subject

The DiExtraBundle has no support for symfony 4 and looks abandoned. This PR will use doctrine/annotations to add support for all symfony versions.

@@ -173,3 +178,22 @@ private function generateFallback($name)
}
}
}

// NEXT_MAJOR: Remove this hack together with DiExtraBundle
Copy link
Contributor

Choose a reason for hiding this comment

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

you should add deprecations

use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;

final class AutoRegisterCompilerPass implements CompilerPassInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

code here looks familiar 😄

}

@trigger_error(
'Automatic registration of annotations is deprecated since 3.14, to be removed in 4.0.',
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe now mention that doctrine should be used

Copy link
Contributor

@kunicmarko20 kunicmarko20 left a comment

Choose a reason for hiding this comment

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

Looks good 👌

Copy link
Member

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

Great work 💪🏻

* group="myGroup",
* label="myLabel",
* showInDashboard=true,
* translationDomain="AppBundle",
Copy link
Member

Choose a reason for hiding this comment

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

This should match the namespace of the example

* showInDashboard=true,
* translationDomain="AppBundle",
* pagerType="",
* persistFilters="",
Copy link
Member

Choose a reason for hiding this comment

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

Empty string? No true/false?

* )
*/
class MyAdmin extends AbstractAdmin
{
Copy link
Member

Choose a reason for hiding this comment

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

Please add „// ...“ to make clear this class is not empty

Annotations using doctrine
==========================

All annotations require doctrine/annotations, it can easily be installed by composer:
Copy link
Member

Choose a reason for hiding this comment

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

Please remove „easily“


final class AutoRegisterCompilerPass implements CompilerPassInterface
{
const DEFAULT_SERVICE_PREFIX = 'app.admin.';
Copy link
Member

Choose a reason for hiding this comment

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

Do we Need this const?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is one usage for it, so yes

@OskarStark
Copy link
Member

Any news here @core23 ?

@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@core23
Copy link
Member Author

core23 commented Feb 9, 2019

Closing this in favor of @kunicmarko20 bundles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants