PHP8 support ?
I understand the question, but it would be more interesting for me if you could show me error messages. Then I would work on that. Haven't tested it for a long time. Do you have a special application scenario?
You're right, I'm sorry.
I don't have it anymore, but the issue was the gd php functions (for example imageline) which are called with floats instead of ints. This triggers a deprecation error.
No strict_types is used in the test file, so barcodes can also be created in PHP version 8. Nothing happened here for a long time, and I don't have that much time to work through everything either. You are more than welcome to send a pull request with improvements.
Ok, will do when I got some free time.
Hi there,
I wanted to work on this, but the version I have differs from this repository. I use composer to get this package : https://packagist.org/packages/jbdemonte/barcode, but in fact on packagist it is linked to github.com/lucabartoli/barcode
I'm a bit confused, and don't really know on which project I should work.
On this one, where we are here, is already the right one. The code from "lucabartoli" has good documentation and somehow belongs there, but is very outdated. It seems to me that the wrong origin is stored on packagist.org.
https://barcode-coder.com/en/
It also have better PSR implementation (which I do need in my framework). I think I'll just keep using lucabartoli's version for now, and just apply a patch.
I can't understand it, because all things are in the file. And the version of "jbdemonte" supports other programming languages. What is meant by PSR?
- https://github.com/jbdemonte/barcode/blob/master/php/php-barcode.php
- https://github.com/lucabartoli/barcode/tree/master/src/JBDemonte/Barcodes
Hi @xxalfa
PSR = PHP Standards Recommendations
I use this library in a framework which use PSR-4 standard (most of recent frameworks are) : https://www.php-fig.org/psr/psr-4/
I could make it work with specific autoload mechanisms, but it is very long/unpleasant work to do/maintain. lucabartoli's version does follow PSR-4 and is therefore easier to use in my project.
Of course, now that I'm reading it, it's like the scales fall from my eyes. To my surprise, I found the time and inclination to write a commit. Is it now possible for you to work with the version?
Hi @xxalfa,
Yes, if you do the work for PSR-4 and fix packagist, I will be able to work on PHP8 compatibility.
I managed to get packagist ownership jbdemonte/barcode transferred to me and after a few tries finally managed to run the following command composer require jbdemonte/barcode successfully.