Comments (8)
LOL, you right, I added that line 👍
from sonataautoconfigurebundle.
https://github.com/kunicmarko20/SonataAutoConfigureBundle/releases/tag/0.6.0
from sonataautoconfigurebundle.
I disagree. I think that this is out of the scope of the bundle (guessing, making it global if no targets, etc.). IMHO we just need to "replicate" the behavior of the tag, with global
and target
attributes.
The target
attribute of the tag seems wrong to me (but this is a SonataAdmin fault, of course) because most of the time, you'll use the configuration:
sonata_admin:
extensions:
app.publish.extension:
admins:
- app.admin.article
implements:
- App\Publish\PublishStatusInterface
excludes:
- app.admin.blog
- app.admin.news
extends:
- App\Document\Blog
instanceof:
- App\Document\Page
uses:
- App\Trait\Timestampable
Mixing both target
attribute and configuration will lead to a mess.
It is fine, as you say, to "guess" for entity and controller of an admin, but for extensions it seems wrong to me.
from sonataautoconfigurebundle.
I don't see a value in admin extension class that requires you to have annotation, then you can just register it as a service, it is not autoconfigured either way.
from sonataautoconfigurebundle.
I don't see a value in admin extension class that requires you to have annotation, then you can just register it as a service, it is not autoconfigured either way.
The annotation is only needed to make it global (and maybe configure the target), without repeating the service, as explained here #15
from sonataautoconfigurebundle.
Hm, ok, I can see the value in that, btw:
App\Admin\Extension\:
resource: '../../src/Admin/Extension'
tags: [{ name: 'sonata.admin.extension' }]
This is not needed anymore.
from sonataautoconfigurebundle.
This is not needed anymore.
Really? Why is not needed? The compiler pass do its stuff for services tagged with sonata.admin.extension
: who is adding this tag? I think this code:
App\Admin\Extension\:
resource: '../../src/Admin/Extension'
tags: [{ name: 'sonata.admin.extension' }]
from sonataautoconfigurebundle.
from sonataautoconfigurebundle.
Related Issues (17)
- Autowire doesn't work (when admin is injected in another service) HOT 3
- Ability to configure the translation domain HOT 3
- Add the ability to configure admin extensions
- Add the ability to configure admin templates HOT 6
- serviceId is not defined HOT 3
- Default value for mosaic button HOT 6
- Default value for adminCode HOT 3
- When I try to alias my admin, I get an error HOT 3
- Block management feature? HOT 2
- Field names for children
- Admin without an Entity HOT 2
- What does option "children" do? HOT 6
- Ignore some admin via configuration
- Add behat test suite
- sonata_auto_configure.admin.suffix ingored? HOT 6
- Setting defaults using the configuration HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonataautoconfigurebundle.