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

Add fixes for PHP 8.2 #522

Open
wants to merge 1,324 commits into
base: master
Choose a base branch
from
Open

Add fixes for PHP 8.2 #522

wants to merge 1,324 commits into from

Conversation

mikespub
Copy link

@mikespub mikespub commented Mar 24, 2023

See https://github.com/mikespub-org/seblucas-cops/releases to download unofficial "1.2.3" or "1.3.2" packages, or
clone/download source code from master branch directly from https://github.com/mikespub-org/seblucas-cops

mbirth and others added 30 commits December 4, 2016 17:27
Some new user agents and a revised one (all for Android apps)

**User Agent was changed by the app**
UserAgent: `EBookDroid`
Android app: Ebookdroid https://play.google.com/store/apps/details?id=org.ebookdroid

**New User Agents**

UserAgent: `BookReader`
Android app: Gorser Ebookreader - https://play.google.com/store/apps/details?id=com.gorser.ebookreader.epub

UserAgent: `CoolReader`
Android app: Cool Reader https://play.google.com/store/apps/details?id=org.coolreader

UserAgent: `PageTurner`
Android app: PageTurner eBook Reader - https://play.google.com/store/apps/details?id=net.nightwhistler.pageturner.ads

UserAgent:  `books\.ebook\.pdf\.reader`
Android app: EBook Reader & PDF Reader - https://play.google.com/store/apps/details?id=books.ebook.pdf.reader
Note: it also works with `books.ebook.pdf.reader`

UserAgent: `com\.hiwapps\.ebookreader`
Android app: Ebook reader (from Hiwapps)- https://play.google.com/store/apps/details?id=com.hiwapps.ebookreader
Note: app does not support epub format

UserAgent: `OpenBook`
Android app: https://play.google.com/store/apps/details?id=app.angeldroid.openbook
Changing cog icon (in the header) to a magnifying glass / search

Why? Magnifying glass its usually considered the search button when the Cog is considered a "configuration tool".
With actual COPS theme people always ask me "where is the search button"?

Note: To play with Search icon size (and make it smaller) see my initial commits to this PR
Android user agent for OPDS reader update
the ouput gets a lot bigger but if I do somthing about it this file will become a mess.
…n the top).

The top margin is already on the cover so there is no need to add it also in the
book title.
That should help in keeping the lock file consistent.
@dunxd
Copy link

dunxd commented Mar 25, 2023

The 1.2.3 package linked to above is throwing errors for me:

[Sat Mar 25 18:38:41 2023] PHP Warning:  require(/cops/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php): Failed to open stream: No such file or directory in /cops/vendor/composer/autoload_real.php on line 45
[Sat Mar 25 18:38:41 2023] PHP Fatal error:  Uncaught Error: Failed opening required '/cops/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php' (include_path='/cops/vendor/phing/phing/classes:/cops/vendor/phpunit/phpunit-selenium:/cops/vendor/appium/php-client:.:/usr/share/php8') in /cops/vendor/composer/autoload_real.php:45
Stack trace:
#0 /cops/vendor/composer/autoload_real.php(49): {closure}()
#1 /cops/vendor/autoload.php(25): ComposerAutoloaderInit0d1b0e9376a19e86b57f1563bfba988b::getLoader()
#2 /cops/config.php(9): require_once('...')
#3 /cops/index.php(10): require_once('...')
#4 {main}
  thrown in /cops/vendor/composer/autoload_real.php on line 45
[Sat Mar 25 18:38:41 2023] 172.30.32.1:53540 [500]: GET / - Uncaught Error: Failed opening required '/cops/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php' (include_path='/cops/vendor/phing/phing/classes:/cops/vendor/phpunit/phpunit-selenium:/cops/vendor/appium/php-client:.:/usr/share/php8') in /cops/vendor/composer/autoload_real.php:45
Stack trace:
#0 /cops/vendor/composer/autoload_real.php(49): {closure}()
#1 /cops/vendor/autoload.php(25): ComposerAutoloaderInit0d1b0e9376a19e86b57f1563bfba988b::getLoader()
#2 /cops/config.php(9): require_once('...')
#3 /cops/index.php(10): require_once('...')
#4 {main}
  thrown in /cops/vendor/composer/autoload_real.php on line 45

@mikespub
Copy link
Author

mikespub commented Mar 25, 2023

Good to know, thanks @dunxd - I may have missed cleaning up the development autoload files before making the .zip package, sorry about that.

If you happen to have composer 2 installed on your system, you can simply install/update the packages again:

$ composer install --no-dev -o

That will:

  • composer install: (re-)install all the needed run packages,
  • --no-dev: remove the development packages (if any), and
  • -o: update & optimize the autoload files again.

You'll find an updated cops-1.2.3b.zip package on the release page above...

@horus68
Copy link
Contributor

horus68 commented Mar 25, 2023

@mikespub This project is no longer maintained by DEV.
Maybe you can start a new software (with a new name or something like "COPS improved") and create a new official repo?
I would love to have an active project.
I can help on the language side, as usual (and some documentation)

@mikespub
Copy link
Author

Hi @horus68 I certainly appreciate your enthusiasm and willingness to help out, as I've seen in these issues and PRs as well :-) But I'm afraid I won't be able to maintain this project on a regular basis though.

This was just a temporary "itch" to scratch for me:
get both COPS and BicBucStriim to work adequately on "modern" PHP 8.2 platforms so that they can live on for another 2 years

So far I've cleaned up and fixed all the PHP 8.2 issues that I found, updated dependencies where I could without major rewrite, and merged the most "interesting" pull requests or forks I discovered into the main code base here. If there's another big one I missed please let me know...

Soon some other "developer" will come around with his/her own wish list, and they'll be able to pick off from this pull request, or fork directly from https://github.com/mikespub-org/seblucas-cops to continue improving it.

And in the meantime "regular" users will be able to use the packages I prepared as starting point, and perhaps a kind "distributor" will prepare and maintain some modern docker images based on what I've started...

And so the project lives on :-)

@dunxd
Copy link

dunxd commented Apr 17, 2023

Just got back from a holiday, and have been using the 1.3.2 release and not getting so many errors. Thanks for your work on this @mikespub .

@mikespub
Copy link
Author

Further updates are available directly from https://github.com/mikespub-org/seblucas-cops on the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet