Skip to content

Conversation

@sammyskills
Copy link
Contributor

@sammyskills sammyskills commented Mar 30, 2023

Fixes #7391

  • fix a bug that View Cells cannot load a view file with _cell when the classname ends with Cell.
  • fix a bug that spark make:cell creates a view file with _cell when the classname does not end with Cell.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@sammyskills sammyskills changed the title fix: view cells fix: view cell cannot locate the auto-generated view file Mar 30, 2023
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Mar 30, 2023
@kenjis
Copy link
Member

kenjis commented Mar 30, 2023

These errors seem to have nothing to do with this PR.

There were 3 errors:

1) CodeIgniter\Images\ImageMagickHandlerTest::testText
CodeIgniter\Images\Exceptions\ImageException: Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:212
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:408
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/BaseHandler.php:418
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Images/ImageMagickHandlerTest.php:300
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106

2) CodeIgniter\Images\ImageMagickHandlerTest::testMoreText
CodeIgniter\Images\Exceptions\ImageException: Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:212
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:408
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/BaseHandler.php:418
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Images/ImageMagickHandlerTest.php:308
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106

3) CodeIgniter\Images\ImageMagickHandlerTest::testImageCreation
CodeIgniter\Images\Exceptions\ImageException: Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:212
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/ImageMagickHandler.php:408
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Images/Handlers/BaseHandler.php:418
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Images/ImageMagickHandlerTest.php:322
phpvfscomposer:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpunit/phpunit/phpunit:106

https://github.com/codeigniter4/CodeIgniter4/actions/runs/4562927692/jobs/8050774291?pr=7392

@sammyskills
Copy link
Contributor Author

Yes, I wonder why it keeps failing here. 🤷🏽‍♂️

@kenjis
Copy link
Member

kenjis commented Mar 31, 2023

Okay.

$ php spark make:cell MyAwesomeCell

CodeIgniter v4.3.3 Command Line Tool - Server Time: 2023-03-31 08:22:09 UTC+00:00

File created: APPPATH/Cells/MyAwesomeCell.php

File created: APPPATH/Cells/my_awesome_cell.php

$ php spark make:cell MyAwesome

CodeIgniter v4.3.3 Command Line Tool - Server Time: 2023-03-31 08:22:17 UTC+00:00

File created: APPPATH/Cells/MyAwesome.php

File created: APPPATH/Cells/my_awesome.php

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kenjis kenjis merged commit c929fc8 into codeigniter4:develop Apr 2, 2023
@kenjis
Copy link
Member

kenjis commented Apr 2, 2023

@sammyskills Thank you!

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

Development

Successfully merging this pull request may close these issues.

Bug: View cell cannot locate the auto-generated view file

2 participants