Comments (2)
Hmm ya, Maker shouldn't have anything todo with the vendor
dir. I suspect this is happening either when we call createClassNameDetails()
or when $generator->execute()
. In either of those 2 paths, we use our autoloader to validate class names. Ultimately, we need to:
"global conditional" that throws an exception if4 is a better idea$fs
is attempting to CRUD$root_project_dir/vendor
.- In our autoloader, exclude any classes that are
- Outside of the
maker.root_namespace
NS (defaults toApp
)
- Outside of the
- This should effectively limit
$fs
to only CRUDphp
files within themaker.root_ namespace
. - Throw an exception if makers
$fs
is trying to modifyphp
files outside of thesrc/
/maker.root_namespace
dir paths.
from maker-bundle.
I think it should be checked if an alias exists as FQCN as well as in the mapping files (which are not read, afaik, since it's not possible to know what kind of setup people have?) and then provide a list of possible targets for classes, instead of picking one?
I think it should be possible to read Doctrine's ORM configuration after they've been processed, since the container has been built during maker's runtime, so maybe validate against that?
I've noticed a similar, but unrelated issue, as maker's config is very basic. It should be left in place for the time being, but I believe something like ORM should rely on the underlying framework configuration first (since, for example, we have multiple ORM mappings and it's a pain to switch maker between them), which would also allow for better validation in these types of cases.
from maker-bundle.
Related Issues (20)
- 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
- Feature Request: Allow custom Generator class in MakerInterface
- make:entity Test --with-ulid or make:entity Test --with-ulid does not use Ulid/Uuid HOT 3
- MakerBundle "enum" entity type prompts "Can this field store multiple enum values" but doesn't handle the case
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.