Skip to content

[ Intl ] disable Intl functions in bootWordpress by default #2247

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
8 changes: 4 additions & 4 deletions packages/php-wasm/node/src/test/php.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2166,10 +2166,10 @@ bar1
it('Should be able to use intl functions', async () => {
const response = await php.run({
code: `<?php
$formatter = new NumberFormatter('en-US', NumberFormatter::CURRENCY);
echo $formatter->format(100.00);
$formatter = new NumberFormatter('fr-FR', NumberFormatter::CURRENCY);
echo $formatter->format(100.00);
$formatter = numfmt_create('en-US', NumberFormatter::CURRENCY);
echo numfmt_format($formatter, 100.00);
$formatter = numfmt_create('fr-FR', NumberFormatter::CURRENCY);
echo numfmt_format($formatter, 100.00);
?>`,
});
expect(response.text).toEqual('$100.00100,00\xA0€');
Expand Down
2 changes: 1 addition & 1 deletion packages/php-wasm/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default defineConfig(({ command }) => {
// the preserve-php-loaders-imports plugin above.
external: [
/php_\d_\d.js$/,
/icudt74l\.js$/,
/icudt74l.js$/,
...getExternalModules(),
],
},
Expand Down
Loading
Loading