I encountered an issue while using your library prayer-times in my Laravel 10 application (current version). When I run the command php artisan serve
, it shows the following error:
![Error Screenshot](https://private-user-images.githubusercontent.com/33777905/283993926-8c6fb2a7-69ac-469c-a1b8-190148b5ea9d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MTI4MjIsIm5iZiI6MTcyNDQxMjUyMiwicGF0aCI6Ii8zMzc3NzkwNS8yODM5OTM5MjYtOGM2ZmIyYTctNjlhYy00NjljLWExYjgtMTkwMTQ4YjVlYTlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDExMjg0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhMzA4NDY2ZGJlY2RlMTczMmY3ZjQ0Yzg3NjQ5Mzc1NmRlNDNjZDRlYzY0MDcxYzczMzYxZTQ4NTYzZWJlMGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.j3dqRSeB1vhhvOewmYyyRElSyyQ1I8N4AhEdGjZRyTw)
After some investigation, I found that the PHP function gregoriantojd()
used in line 533 of the PrayerTimes.php class is not recognized by the current PHP version. My current PHP version is:
![PHP Version Screenshot](https://private-user-images.githubusercontent.com/33777905/283994162-1af2ef4d-879e-4426-aa31-60eef5fafd99.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MTI4MjIsIm5iZiI6MTcyNDQxMjUyMiwicGF0aCI6Ii8zMzc3NzkwNS8yODM5OTQxNjItMWFmMmVmNGQtODc5ZS00NDI2LWFhMzEtNjBlZWY1ZmFmZDk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDExMjg0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0OWQ1MWEwOGNiYTM5YjZlZGE4YWJmYmM4NmVlNzNmNmMzYTVhMTlkMjI1NWQ5MmZkYzNmYTUyYjlkODQ4ZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2vIormLr0eFS9JOEsZ6DfdCvD-yJzEcp9QshQNqurRs)
The library works fine in Homestead, where the PHP version is:
![Homestead PHP Version Screenshot](https://private-user-images.githubusercontent.com/33777905/283994218-43b68292-5499-4e9e-a730-7cc27ec6301f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MTI4MjIsIm5iZiI6MTcyNDQxMjUyMiwicGF0aCI6Ii8zMzc3NzkwNS8yODM5OTQyMTgtNDNiNjgyOTItNTQ5OS00ZTllLWE3MzAtN2NjMjdlYzYzMDFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDExMjg0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmMmRkYWE4NmM5ZjZmNzM3MTE3ZjlmNzU4MWNlNjkxYjFlNzBiODgwMWI1NDdlODUwM2YwYzAzZjQxY2ZlYTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.rGm01yfp4eDfOcT9Pxzv7BrLETEIlud6oWBAHMyQe9o)
Additional Information:
In addition, I noticed a discrepancy in line 533 of the PrayerTimes.php class . Specifically, it suggests receiving the year using $this->date->format('y')
, but according to the PHP documentation, it should be received as $this->date->format('Y')
to represent the four-digit year. Please consider updating this part of the code for consistency and compatibility.
Please advise on how to resolve this compatibility issue or if there is a recommended PHP version for using the prayer-times
library.
Thank you!