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

Bug: spark make:cell doesn't create view file properly #7469

Closed
rcorsari opened this issue May 1, 2023 · 6 comments · Fixed by #7481
Closed

Bug: spark make:cell doesn't create view file properly #7469

rcorsari opened this issue May 1, 2023 · 6 comments · Fixed by #7481
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@rcorsari
Copy link

rcorsari commented May 1, 2023

deleted because of a mistake, sorry, I recap in the following reply

@rcorsari rcorsari added the bug Verified issues on the current code behavior or pull requests that will fix them label May 1, 2023
@rcorsari
Copy link
Author

rcorsari commented May 1, 2023

Environment WIndows
PHP 8.2
Codeigniter is 4.3.4 installed as appStarter with composer
MariaDB is latest version
Served with php spark serve

This is the terminal
(follows after the terminal output)

C:\WWW\htmx>php spark make:cell PippoCell

CodeIgniter v4.3.4 Command Line Tool - Server Time: 2023-05-01 16:56:42 UTC+00:00

File created: APPPATH\Cells\PippoCell.php

File created: APPPATH\Cells\pippo_cell.php

but these are the contents of the two files

PippoCell.php

<?php

namespace App\Cells;

use CodeIgniter\View\Cells\Cell;

class PippoCell extends Cell
{
    //
}

and

pippo_cell.php

<?php

namespace App\Cells;

use CodeIgniter\View\Cells\Cell;

class pippo_cell extends Cell
{
    //
}

@kenjis kenjis removed the bug Verified issues on the current code behavior or pull requests that will fix them label May 2, 2023
@kenjis
Copy link
Member

kenjis commented May 2, 2023

Please use bug report template.
And what's your issue?
The behavior you reported is expected.

@rcorsari
Copy link
Author

rcorsari commented May 2, 2023

So now both the cell and the cellview are a class?
Thank you for confirming
I ask because one subversion ago, 4.3.3 the cells bug was just the naming of the files
but the view content was HTML and exactly a DIV opening and closing tag
thank you

@paulbalandan
Copy link
Member

I think this is a bug caused by #7458. The addition of make:cell in the Config/Generators array effectively bypasses $this-template reassignment in

$this->template = 'cell_view.tpl.php';
, causing both the class name and view name using the same template.

@paulbalandan paulbalandan added the bug Verified issues on the current code behavior or pull requests that will fix them label May 2, 2023
@paulbalandan
Copy link
Member

Confirmed to be found in v4.3.4, not on v4.3.3

@kenjis
Copy link
Member

kenjis commented May 2, 2023

Oh, I see. I didn't see the contents of the files.

@kenjis kenjis changed the title Bug: spark make:cell doesn't work properly Bug: spark make:cell doesn't create view file properly May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
3 participants