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

improve dal:validate to reach green status ! #4758

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

raphael-homann
Copy link
Contributor

to dal:validate command

  • add DefinitionValidatorFilterEvent

1. Why is this change necessary?

  • dal:validate has many errors, not my fault (Shopware\Core and other)
  • I would like to have a full green dal:validate on my own code (so I can use it in my precommit hook)
  • I have tables on my database I want to keep, but I don't want to have errors on these tables

2. What does this change do, exactly?

  • The entityDefinitions filter is not only hardcoded anymore. I added an event, so every plugin can filter definitions to check
  • I added an option --check-unregistered-tables / --no-check-unregistered-tables on dal:validate command.
    by default, nothing changes

3. Describe each step to reproduce the issue or behaviour.

  • execute dal:validate, and you will have many errors
  • execute dal:validate --no-check-unregistered-tables command, you won't see "Table ... has no configured definition"

4. Please link to the relevant issues (if any).

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

  to dal:validate command
- add DefinitionValidatorFilterEvent
@raphael-homann raphael-homann changed the title - add check-unregistered-tables option improve dal:validate to reach green status ! Sep 17, 2024
@raphael-homann
Copy link
Contributor Author

hard to check PHP lint and BC check 😅
One wants to add : void to configure method, while the other one does not want

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

Successfully merging this pull request may close these issues.

2 participants