Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Shortcut debug:form for partial type name#29452

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromro0NL:form-debug
Dec 10, 2018
Merged

[Form] Shortcut debug:form for partial type name#29452

fabpot merged 1 commit intosymfony:masterfromro0NL:form-debug
Dec 10, 2018

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedDec 4, 2018
edited by nicolas-grekas
Loading

QA
Branch?master
Bug fix?yes-ish
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

When runningdebug:form we must specify the short type class case-sensitive. As the current autoloader doesnt check for insensitive names.

I propose this shortcut to quickly enable

debug:form urldebug:form urltype

instead of forcing

debug:form UrlType

@yceruto
Copy link
Member

👍 for the shortcut.

I'd like also typemydatetype instead ofMyDateType.

@ro0NL
Copy link
ContributorAuthor

i dont think we can conventionally changemydate toMyDate

@yceruto
Copy link
Member

right, but we can changeMyDate tomydate :)

ro0NL reacted with confused emoji

@nicolas-grekasnicolas-grekas added this to thenext milestoneDec 6, 2018
@stof
Copy link
Member

stof commentedDec 7, 2018

@yceruto but that replacement is not the one you were asking for, as the input you asked for ismydate

@msvrtan
Copy link

msvrtan commentedDec 8, 2018
edited
Loading

In order to test your branch out, I rebased it locally with current master (and there were around 3k commits difference) and I have a bug to report:

On symfony 4.2 based skeleton project, when I runphp bin/console debug:form urltype I get

2018-12-08T11:32:46+00:00 [error] Error thrown while running command "debug:form urltype -vvv". Message: "Case mismatch between loaded and declared class names: "Symfony\Component\Form\Extension\Core\Type\urltype" vs "Symfony\Component\Form\Extension\Core\Type\UrlType"."2018-12-08T11:32:46+00:00 [debug] Command "debug:form urltype -vvv" exited with code "1"In DebugClassLoader.php line 185:  [RuntimeException]  Case mismatch between loaded and declared class names: "Symfony\Component\Form\Extension\Core\Type\urltype" vs "Symfony\Component\Form\Extension\Core\Type\UrlType".Exception trace: () at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:185 Symfony\Component\Debug\DebugClassLoader->checkClass() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:161 Symfony\Component\Debug\DebugClassLoader->loadClass() at n/a:n/a spl_autoload_call() at n/a:n/a class_exists() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Form/Command/DebugCommand.php:159 Symfony\Component\Form\Command\DebugCommand->getFqcnTypeClass() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Form/Command/DebugCommand.php:119 Symfony\Component\Form\Command\DebugCommand->execute() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Command/Command.php:255 Symfony\Component\Console\Command\Command->run() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:919 Symfony\Component\Console\Application->doRunCommand() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:89 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:262 Symfony\Component\Console\Application->doRun() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:145 Symfony\Component\Console\Application->run() at /work/noob/learning/symfonyconhackday/pr29452/bin/console:40

Same thing happens withphp bin/console debug:form urlType -vvv

2018-12-08T11:33:35+00:00 [error] Error thrown while running command "debug:form urlType -vvv". Message: "Case mismatch between loaded and declared class names: "Symfony\Component\Form\Extension\Core\Type\urlType" vs "Symfony\Component\Form\Extension\Core\Type\UrlType"."2018-12-08T11:33:35+00:00 [debug] Command "debug:form urlType -vvv" exited with code "1"In DebugClassLoader.php line 185:  [RuntimeException]  Case mismatch between loaded and declared class names: "Symfony\Component\Form\Extension\Core\Type\urlType" vs "Symfony\Component\Form\Extension\Core\Type\UrlType".Exception trace: () at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:185 Symfony\Component\Debug\DebugClassLoader->checkClass() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:161 Symfony\Component\Debug\DebugClassLoader->loadClass() at n/a:n/a spl_autoload_call() at n/a:n/a class_exists() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Form/Command/DebugCommand.php:159 Symfony\Component\Form\Command\DebugCommand->getFqcnTypeClass() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Form/Command/DebugCommand.php:119 Symfony\Component\Form\Command\DebugCommand->execute() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Command/Command.php:255 Symfony\Component\Console\Command\Command->run() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:919 Symfony\Component\Console\Application->doRunCommand() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:89 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:262 Symfony\Component\Console\Application->doRun() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /work/noob/learning/symfonyconhackday/symfony/src/Symfony/Component/Console/Application.php:145 Symfony\Component\Console\Application->run() at /work/noob/learning/symfonyconhackday/pr29452/bin/console:40

while thephp bin/console debug:form url does work as expected.

IMO issue is not in your changes in the code but as you have based it on an older master or tag, there are additional changes needed.

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedDec 8, 2018
edited
Loading

Hi@msvrtan ive rebased on latest master. On my machine everything is working as expected;

debug:form urltypeSymfony\Component\Form\Extension\Core\Type\UrlType (Block prefix:"url")========================================================================debug:form urltype --no-debugSymfony\Component\Form\Extension\Core\Type\UrlType (Block prefix:"url")========================================================================

@fabpot
Copy link
Member

Thank you@ro0NL.

@fabpotfabpot merged commita28e3b6 intosymfony:masterDec 10, 2018
fabpot added a commit that referenced this pull requestDec 10, 2018
This PR was merged into the 4.3-dev branch.Discussion----------[Form] Shortcut debug:form for partial type name| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes-ish| New feature?  | yes| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->When running `debug:form` we must specify the short type class case-sensitive. As the current autoloader doesnt check for insensitive names.I propose this shortcut to quickly enable```debug:form urldebug:form urltype```instead of forcing```debug:form UrlType```Commits-------a28e3b6 [Form] Shortcut debug:form for partial type name
@ro0NLro0NL deleted the form-debug branchDecember 10, 2018 08:12
nicolas-grekas added a commit that referenced this pull requestMar 13, 2019
This PR was merged into the 4.3-dev branch.Discussion----------[Form] Fix debug form when using partial type name| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MITSince#29452 (4.3) we have the possibility of passing a partial type name. This fixes the case where `debug:form dateTime` doesn't work as expected:```bashIn FormRegistry.php line 89:  [Symfony\Component\Form\Exception\InvalidArgumentException]  Could not load type "dateTime": class does not implement "Symfony\Component\Form\FormTypeInterface".```Commits-------22b20ca Fix debug:form dateTime
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

7 participants

@ro0NL@yceruto@stof@msvrtan@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp