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

demo with old config build #2012

Closed
staabm opened this issue Feb 6, 2024 · 1 comment · Fixed by #2028
Closed

demo with old config build #2012

staabm opened this issue Feb 6, 2024 · 1 comment · Fixed by #2028

Comments

@staabm
Copy link
Contributor

staabm commented Feb 6, 2024

I tried running the online demo with

<?php

final class HelloWorld
{
    private readonly DateTime $now;

    public function __construct(
        ?DateTime $now = null 
    ) {
        $this->now = $now ?? new DateTime();
    }
}

and config

<?php

use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        \Rector\Set\ValueObject\SetList::TYPE_DECLARATION,
    ]);
}

and when submitting the form I only get a http 500 error page?
I would expect a more helpful error message.

does the old config style no longer work on the demo?

@staabm
Copy link
Contributor Author

staabm commented Feb 6, 2024

ahh I just realized that I have a linting error in my config. it is missing a ; at the end.

sounds like something the demo could provide a more helpful error message :-)

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

Successfully merging a pull request may close this issue.

1 participant