Comments (3)
Hey @sadikoff!
Whatβs the advantage of your proposal? The current implementation allows us to add other methods in the future for different situations. And I like the auto completion :)
from maker-bundle.
@weaverryan just an idea. For example I have 6 dependencies in make:crud and I need 6 times to write $dependencies->addClassDependency(...)
may be we can find better way to simplify it. My initial idea was to write something like:
public function configureDependencies(DependencyBuilder $dependencies)
{
$dependencies->addClassDependencies([
[Route::class, 'annotations'],
[Route::class, 'annotations'],
[Route::class, 'annotations'],
[Route::class, 'annotations'],
]);
}
Or may be we can make add(...)
like in FormBuilder
public function configureDependencies(DependencyBuilder $dependencies)
{
$dependencies
->addClass(Route::class, 'annotations')
->addClass(Route::class, 'annotations')
->addClass(Route::class, 'annotations')
->addClass(Route::class, 'annotations')
->addClass(Route::class, 'annotations')
;
}
The main advantage is that we will write less code :)
from maker-bundle.
@sadikoff I tend to agree with Ryan here. Even if your proposal is more concise, it could limit us in the future (this is an hypothesis, I don't have specific examples of what else we could do here). Also, the existing config is annoying mostly for the CRUD generator, whose complexity is an edge case. All the other makes are (a lot) simpler. Let's close for now as "won't fix". Thanks!
from maker-bundle.
Related Issues (20)
- [make:entity] addGetter on boolean field that starts with "is" HOT 1
- [make:entity] `generate()` call to `is_string()` appears to always evaluate to `false`
- Missing ? in symfony console make:entity? HOT 9
- Critical error: ClassSourceManipulator HOT 4
- [make:entity] Exception in DoctrineHelper.php HOT 2
- Why is the registration confirmation link (verify-email-bundle) not working in Symfony 6 ? HOT 8
- [make:auth] V1.59 - Deprecated classes causes deprecated message on each page HOT 1
- [make:entity] no more autocompletion on repository methods HOT 1
- Use final classes
- Deprecation : symfony/maker-bundle v1.59.0 HOT 1
- PHPStan - User::getPassword()
- PHPStan - ResetPasswordRequest::getUser()
- [make:crud] Add support for dynamic CSRF id with Expression in `#[IsCsrfTokenValid]`
- [make:crud] Allow `EntityValueResolver` to return a list of entities
- [make:registration-form] Add `hash_property_path` option to `PasswordType` HOT 1
- [make:reset-password] Add `hash_property_path` option to `PasswordType` HOT 1
- [make:entity] Entity Names Should Be Allowed to Have Digits (i.e. v1) HOT 1
- [make:entity] default value
- [make:entity] Maker modifies vendor files if FQCN covers up local alias HOT 2
- Feature Request: Allow custom Generator class in MakerInterface
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 maker-bundle.