[BUG]: use statements wrongly placed, or before namespace or twice or missing #1261

Closed
opened 2025-10-10 14:06:05 +00:00 by PyroClash · 3 comments

What Happened?

I'm trying to do the Hello World tutorial.
Each time i compile my component i have to modify several php files because the use statements are :

  • either wrongly placed (sometimes in the same line as comments blocs or before namespace declaration)
  • appearing twice
  • not present

Steps to reproduce the Bug

Follow the Hello World Component video tutorial.

Which Joomla version are you compiling in?

v5.3.4

Which PHP version are you compiling in?

v8.2.29

Which Joomla versions are you targeting?

Joomla 5

Which PHP version are you targeting?

8.2

Which Web server is JCB running on?

Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.29

Which Relational Database is JCB running on?

10.4.32-MariaDB

Which OS is JCB running on?

Windows 11

Which JCB version are you using?

v5.1.2-rc2 (same issue with 5.1)

Where in JCB did this issue occur?

Compilation of a component

On which browsers did you encounter the issue?

Firefox, Brave

Additional Comments

No response

### What Happened? I'm trying to do the Hello World tutorial. Each time i compile my component i have to modify several php files because the use statements are : - either wrongly placed (sometimes in the same line as comments blocs or before namespace declaration) - appearing twice - not present ### Steps to reproduce the Bug Follow the [Hello World Component video tutorial](https://youtu.be/IQfsLYIeblk?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE). ### Which Joomla version are you compiling in? v5.3.4 ### Which PHP version are you compiling in? v8.2.29 ### Which Joomla versions are you targeting? Joomla 5 ### Which PHP version are you targeting? 8.2 ### Which Web server is JCB running on? Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.29 ### Which Relational Database is JCB running on? 10.4.32-MariaDB ### Which OS is JCB running on? Windows 11 ### Which JCB version are you using? v5.1.2-rc2 (same issue with 5.1) ### Where in JCB did this issue occur? Compilation of a component ### On which browsers did you encounter the issue? Firefox, Brave ### Additional Comments _No response_
PyroClash added the Bug label 2025-10-10 14:06:05 +00:00

On Windows JCB has a issue with the line endings of the code templates.
Use JCB 6.1.2-rc2 and add this fix:
#1219 (comment)

On Windows JCB has a issue with the line endings of the code templates. Use JCB 6.1.2-rc2 and add this fix: https://git.vdm.dev/joomla/Component-Builder/issues/1219#issuecomment-39637
Author

Thank you for your answer. I've switched to using Docker OctoJoom for my Joomla setup, which has resolved the issue.

Thank you for your answer. I've switched to using Docker OctoJoom for my Joomla setup, which has resolved the issue.

On Windows JCB has a issue with the line endings of the code templates.
Use JCB 6.1.2-rc2 and add this fix:
#1219 (comment)

@PyroClash did try to do this, but had issues with MySQL dying...meaning that applying this, did not improve the situation...

> On Windows JCB has a issue with the line endings of the code templates. > Use JCB 6.1.2-rc2 and add this fix: > https://git.vdm.dev/joomla/Component-Builder/issues/1219#issuecomment-39637 @PyroClash did try to do this, but had issues with MySQL dying...meaning that applying this, did not improve the situation...
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1261