-
-
Notifications
You must be signed in to change notification settings - Fork 196
Changing to support next version of stimulus bridge with "fetch" mode #735
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
Conversation
if you want to avoid a hard break, you could actually set both keys in Flex. stimulus-bridge will ignore the key it does not need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BC break is fine to my side.
We could maybe make flex turn existing webpackMode
entries into fetch
?
I've just done that 👍 symfony/ux#53
👍 It indeed does this :) |
{ | ||
$this->tempDir = sys_get_temp_dir().'/flex-package-json-'.substr(md5(uniqid('', true)), 0, 6); | ||
(new Filesystem())->mirror(__DIR__.'/Fixtures/packageJson', $this->tempDir); | ||
|
||
$this->synchronizer = new PackageJsonSynchronizer($this->tempDir); | ||
} | ||
|
||
public function tearDown(): void | ||
protected function tearDown(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fabbot-motivated change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fabbot is great!
@@ -149,7 +149,7 @@ private function registerWebpackResources(array $phpPackages) | |||
} | |||
} | |||
|
|||
file_put_contents($controllersJsonPath, json_encode($newControllersJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)."\n"); | |||
file_put_contents($controllersJsonPath, json_encode($newControllersJson, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)."\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fabbot motivated
…ge#15 (weaverryan) This PR was merged into the main branch. Discussion ---------- Changing webpackMode to fetch - see symfony/stimulus-bridge#15 | Q | A | ------------- | --- | Bug fix? | yes(ish) | New feature? | no | Tickets | none | License | MIT Hi! If symfony/stimulus-bridge#15 is merged, this updates the keys for all the UX packages. The old `webpackMode` is kept for now. This will prevent errors if you're using an "old" Flex version (a version before this PR symfony/flex#735). We can remove that... eventually... Cheers! Commits ------- 27f7115 Adding fetch - see symfony/stimulus-bridge#15
Thanks @weaverryan. |
…ge#15 (weaverryan) This PR was merged into the main branch. Discussion ---------- Changing webpackMode to fetch - see symfony/stimulus-bridge#15 | Q | A | ------------- | --- | Bug fix? | yes(ish) | New feature? | no | Tickets | none | License | MIT Hi! If symfony/stimulus-bridge#15 is merged, this updates the keys for all the UX packages. The old `webpackMode` is kept for now. This will prevent errors if you're using an "old" Flex version (a version before this PR symfony/flex#735). We can remove that... eventually... Cheers! Commits ------- 27f7115 Adding fetch - see symfony/stimulus-bridge#15
Partner to symfony/stimulus-bridge#15 and symfony/ux#53
The tricky part about this is that, if the user has
stimulus-bridge
1.x, then theircontrollers.json
file needswebpackMode
. If they havestimulus-bridge
"next" (we're thinking it'll be 2.0), then theircontrollers.json
file needsfetch
. This means that Flex has a "hard break" and sorta just needs to assume that the user has the "new" version.We made the decision - to go from
webpackMode
tofetch
because the setting no longer is truly the same aswebpackMode
. However, if we wanted to make the upgrade path easier, we could revert that and usewebpackMode
in 2.0 as well (instead of changing tofetch
).