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

Found unconstructed IntlDateFormatter #1783

Closed
xillibit opened this issue Jan 15, 2024 · 6 comments
Closed

Found unconstructed IntlDateFormatter #1783

xillibit opened this issue Jan 15, 2024 · 6 comments
Milestone

Comments

@xillibit
Copy link

xillibit commented Jan 15, 2024

Describe the bug
Following error happens when trying to build a project : Found unconstructed IntlDateFormatter

Steps To Reproduce
The error happens when switch to Php 8.1.26 on Php 8.0.30 the error isn't here.

Tested on Phing 3.0.0 rc6 and main branch

Expected behavior
No error

Screenshots / terminal output
`C:/Users/xillibit/PhpstormProjects/Kunena-Forum-6.2/vendor/phing/phing/bin/phing.bat -f C:/Users/xillibit/PhpstormProjects/myproject-6.2/build.xml dist
Buildfile: C:\Users\xillibit\PhpstormProjects\myproject-6.2\build.xml
[property] Loading C:\Users\xillibit\PhpstormProjects\myproject-6.2\build.properties
[xmlproperty] Loading C:\Users\xillibit\PhpstormProjects\myproject-6.2\src\pkg_myproject.xml

BUILD FAILED
Found unconstructed IntlDateFormatter

Total time: 0.1352 seconds`

Additional context
Add any other context about the problem here.

@mrook mrook added this to the 3.0.0 milestone Jan 26, 2024
@mrook
Copy link
Member

mrook commented Jan 26, 2024

Can you share a reproduction build file?

@mrook
Copy link
Member

mrook commented Jan 26, 2024

Seems to be linked to php/php-src#12912

@xillibit
Copy link
Author

Yes you can find here the build file : https://github.com/Kunena/Kunena-Forum/blob/K6.2/build.xml

@mrook
Copy link
Member

mrook commented Jan 27, 2024

Can you write a smaller reproduction build file? That one looks like I need a bunch of dependencies.

@xillibit
Copy link
Author

I have reduced it :

`

<!-- Setup of any global settings that will apply to the entire build script -->
<property file="build.properties" />

<condition
	property="project_dir"
	value="src/">
	<not>
		<isset property="project_dir" />
	</not>
</condition>
<condition
	property="tmp_dir"
	value="dist/tmp">
	<not>
		<isset property="tmp_dir" />
	</not>
</condition>
<condition
	property="build_dir"
	value="dist/package">
	<not>
		<isset property="build_dir" />
	</not>
</condition>
<!-- This directory will persist between builds to make some parts of build faster -->
<condition
	property="cache_dir"
	value="dist/cache">
	<not>
		<isset property="cache_dir" />
	</not>
</condition>
<condition
	property="package_dir"
	value="dist/package">
	<not>
		<isset property="package_dir" />
	</not>
</condition>
<condition
	property="base.directory"
	value="dist">
	<not>
		<isset property="base.directory" />
	</not>
</condition>

<xmlproperty
	file="src/pkg_kunena.xml"
	collapseAttributes="true"
	prefix="xml"
	keepRoot="false" />
<tstamp>
	<format
		property="str.datefmt"
		pattern="${cfg.datefmt}"
		locale="${cfg.dateloc}" />
</tstamp>
<condition
	property="version.date"
	value="${str.datefmt}">
	<istrue value="${cfg.adddate}" />
</condition>
<condition
	property="str.version"
	value="_${cfg.versionprefix}${xml.version}">
	<istrue value="${cfg.addversion}" />
</condition>
<condition
	property="str.date"
	value="_${str.datefmt}">
	<istrue value="${cfg.adddate}" />
</condition>

<property
	name="str.fileversion"
	value="${str.version}${str.date}" />

<condition property="do.tar">
	<istrue value="${cfg.tar}" />
</condition>
<condition property="do.zip">
	<istrue value="${cfg.zip}" />
</condition>
<condition property="do.gzip">
	<istrue value="${cfg.gzip}" />
</condition>
<condition property="do.bz2">
	<istrue value="${cfg.bz2}" />
</condition>

<!-- Add version information to all xml files and forum.php -->
<filterchain id="filter">
	<replacetokens>
		<token
			key="kunenaversion"
			value="${xml.version}" />
		<token
			key="kunenaversiondate"
			value="${version.date}" />
		<token
			key="kunenaversionname"
			value="${xml.versionname}" />
		<token
			key="kunenaversionbuild"
			value="${xml.version}" />
		<token
			key="kunenachangelog"
			value="https://update.kunena.org/changelog/${xml.version}.xml" />
	</replacetokens>
</filterchain>

<property
	name="kunena.admin"
	value="src/admin" />
<property
	name="kunena.libraries"
	value="src/libraries/kunena" />
<property
	name="kunena.media"
	value="src/media/kunena" />
<property
	name="kunena.plugins"
	value="src/plugins" />
<property
	name="kunena.site"
	value="src/site" />

<target
	name="dist"
	depends="init" />

<target name="init">
	<echo message="Hello, welcome to ${phing.project.name} build tool!" />
</target>

`

@mrook mrook closed this as completed in c764f7f Jan 30, 2024
@mrook
Copy link
Member

mrook commented Jan 30, 2024

Thanks. Your locale was incorrect, which triggered the error. Phing now handles that better (shows a warning).

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

No branches or pull requests

2 participants