Skip to content

Stimulus controllers: allow to define outlets #942

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

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Conversation

jmsche
Copy link
Contributor

@jmsche jmsche commented Jun 14, 2023

Q A
Bug fix? no
New feature? yes
Tickets N/A
License MIT

This PR allows to define outlets to Stimulus controllers. See https://stimulus.hotwired.dev/reference/outlets

Also updated .gitignore as running PHPUnit locally generated a .phpunit.result.cache file.

@jmsche jmsche changed the title Outlets Stimulus controllers: allow to define outlets Jun 14, 2023
@jmsche
Copy link
Contributor Author

jmsche commented Jun 14, 2023

I've just seen that the PR on Webpack Encore bundle adds an addOutlet() function instead, but I feel it's more meaningful and less error prone to add it to the controller directly.

Also, should I PR against Encore bundle (v1) if this PR gets merged?

Hello
</div>

<!-- would render -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-would+will ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just followed the other examples (that I didn't write); should I change them all?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know :/
I was just reviewing unitary lol

@weaverryan
Copy link
Member

Thanks @jmsche! This looks great

@weaverryan weaverryan merged commit 029be0c into symfony:2.x Jun 29, 2023
@jmsche
Copy link
Contributor Author

jmsche commented Jun 29, 2023

@weaverryan Should I also PR against Encore bundle (v1)?

@weaverryan
Copy link
Member

@jmsche I don't think so. My thinking is that upgrading from EncoreBundle 1 to 2 is trivial. And 1 should be considered in maintenance - bug fixes only.

@jmsche
Copy link
Contributor Author

jmsche commented Jun 29, 2023

I guess symfony/webpack-encore-bundle#205 & symfony/webpack-encore-bundle#206 can be closed then?

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 this pull request may close these issues.

3 participants