CodeIgniter HTMX |
CodeIgniter HTMX
This is a helper library for HTMX. A set of methods for IncomingRequest, Response, and RedirectResponse classes to help you work with HTMX fluently in the CodeIgniter 4 framework. It also provides some additional help with handling errors in development mode as well as support for view fragments. You can read all the details in the documentation. There is also a separate repo with demos that covers many use cases, like:
Looks like a great helper library. The search feature in the demo app, last tab, triggers an error for error handling demoing, I suppose?
Is there any way to make it work with php 7.4 ? I dread upgrading the four projects on the production server...
==
Donatas G. (01-15-2023, 03:22 AM)dgvirtual Wrote: Looks like a great helper library. The search feature in the demo app, last tab, triggers an error for error handling demoing, I suppose? Thanks, there was indeed an error caused when trying to search the books. This has now been fixed. I have no plans of supporting PHP 7.4, but you can certainly install this library manually and make the necessary changes. I would search for things like match, str_starts_with and union types in method parameters. It shouldn't be hard.
[quote pid="405307" dateline="1673779217"]
I have no plans of supporting PHP 7.4, but you can certainly install this library manually and make the necessary changes. I would search for things like match, str_starts_with and union types in method parameters. It shouldn't be hard. [/quote] Thanks, it was not hard actually. I have created a fork and made it work with php7, here: https://github.com/dgvirtual/codeigniter-htmx One can install it manually and the @michalsn's codeigniter-htmx-demo app seems to work flawlessly with it (the demo app itself seems not to contain any PHP8-only code). I did not test it the proper way though; I tried running composer test and For now, unfortunately, I was unable to add a possibility to install it via composer. Tried this: adding to the app's composer.json file repositories key: Code: "repositories": { Code: composer require michalsn/codeigniter-htmx:php7port still complains about PHP version: Code: [InvalidArgumentException] Code: composer require michalsn/codeigniter-htmx:dev-php7port --ignore-platform-reqs Code: [InvalidArgumentException]
==
Donatas G.
@dgvirtual - please check these instructions: https://getcomposer.org/doc/05-repositor...repository
The alternative would be to create your own composer package.
Ah, so changing the vendor in package.json must have been the problem... will revert to original line.
==
Donatas G.
OK, so composer installation works now; to install in an existing composer project, run in command line:
composer config minimum-stability dev composer config repositories.codeigniter-htmx vcs [email protected]:dgvirtual/codeigniter-htmx.git composer require michalsn/codeigniter-htmx:dev-php7port @michalsn, maybe you know if there is any way for me to automatically find out when your library get's updated, so I can update the port?
==
Donatas G. |
Welcome Guest, Not a member yet? Register Sign In |