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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1324 commits
Select commit Hold shift + click to select a range
7b7b900
Add required PHP extensions to Composer config.
mbirth Dec 4, 2016
2509db5
Merge pull request #274 from mbirth/code-cleanup
seblucas Dec 13, 2016
50c9768
Remove slack notification (at least for now)
seblucas Dec 13, 2016
46a5864
Modify all badges to really use this repository.
seblucas Dec 13, 2016
c50e4a6
Fix the mail sender.
seblucas Dec 13, 2016
c51bb51
This should fix saucelabs
seblucas Dec 13, 2016
ae2232d
Fix the dependency to LRUCache (we need an older version). Update all…
seblucas Dec 13, 2016
e1aa319
Merge pull request #302 from jeremitu/master
seblucas Dec 13, 2016
e39b94b
Fixed the link to all COPS contributors. Thanks to horus68 for the re…
seblucas Dec 13, 2016
20651f8
Seems that the doT directory is in fact dot directory. Should fix sauce.
seblucas Dec 13, 2016
d7c2b2c
Android user agent for OPDS reader update
horus68 Dec 14, 2016
4d783df
Changing cog icon to a magnifying glass
horus68 Dec 14, 2016
282a62b
Avoid mixed content if login is accessed over HTTPS. thanks to polyta…
seblucas Dec 14, 2016
ae7b860
Merge pull request #309 from horus68/patch-3
seblucas Dec 14, 2016
9ed724d
Update Changelog
seblucas Dec 15, 2016
a577645
Add a mention in config_local.php.example to find all configuration i…
seblucas Dec 17, 2016
5fd679e
Fix the remaining badges from the README.
seblucas Dec 19, 2016
4599b88
Simplify .gitignore and handle cops packages better
seblucas Dec 22, 2016
05ce7f2
Add a chapter in the README to explain how to install from sources. a…
seblucas Dec 23, 2016
3be7a57
Remove IE9 from sauce (way too old to maintain)
seblucas Dec 23, 2016
178d62e
typo fixed (copy paste gone wrong).
seblucas Dec 23, 2016
91cf10f
Update phing build file with the new composer thing.
seblucas Dec 23, 2016
212092e
Update the README a little. Especially to enhance the easiest way to …
seblucas Dec 23, 2016
4a917ca
Fixed the hover effect on the books article (2 or 3 pixel too short o…
seblucas Dec 26, 2016
3af6d70
This should fix travis with PHP 5.5 (and maybe below)
seblucas Dec 26, 2016
02b9c0d
Forgot to add the composer asset plugin in the README
seblucas Jan 4, 2017
2459b8d
Added caching in the Travis build (should enhance speed)
seblucas Jan 4, 2017
e96581a
Updated deps, especially PHPMailer with a Critical Vulnerability
seblucas Jan 4, 2017
4576dfc
Added platform in composer to the lowest supported version.
seblucas Jan 4, 2017
1b628ef
Modified the README.md to add the case of PHP lower than 5.6
seblucas Jan 4, 2017
3b21375
Fixed full height click on books. fix #149
seblucas Jan 23, 2017
838bfe8
Fix the full height click (introduced in 3b2137562d04794e26a27d62ec66…
seblucas Mar 3, 2017
523c08c
Modify the mail button's title to include the format that will be sen…
seblucas Mar 5, 2017
159637f
Add a configuration item to specify the mail subject. re #326
seblucas Mar 5, 2017
d89a93b
prepare release. re #323
seblucas Mar 5, 2017
92c475f
Translations updates from Transifex
horus68 Mar 9, 2017
cca457e
Copyright year update
horus68 Mar 9, 2017
5ca21de
Merge pull request #330 from horus68/lang201703
seblucas Mar 10, 2017
e6818f5
Merge pull request #331 from horus68/patch-2
seblucas Mar 10, 2017
22e13b4
Update changelog. re #323
seblucas Mar 12, 2017
ece9423
Update changelog / update Version
seblucas Apr 2, 2017
4a45a1d
Fix the automatic generation of package
seblucas Apr 2, 2017
df2af3d
Fix the package generated
seblucas Apr 2, 2017
d479f74
Étiquette 1.1.0 ajoutée à la révision e61fd2d791c5
seblucas Apr 2, 2017
51f74cd
Prepare for next release.
seblucas Apr 2, 2017
83a41a4
Fix automatic package upload with travis.
seblucas Apr 2, 2017
41c0780
Merge pull request #310 from horus68/patch-1
seblucas Apr 4, 2017
2fbfc69
Should fix the tests with PHP 5.5.
seblucas Apr 7, 2017
29d7608
Try to test PHP 5.4 also. re #338
seblucas Apr 7, 2017
6d36132
Update sendtomail.php
ubupl Apr 10, 2017
6bb55df
Documentation for GMX SMTP configuration
ubupl Apr 25, 2017
de35a3e
Merge pull request #339 from ubupl/master
seblucas Apr 25, 2017
86d52a3
Merge pull request #343 from ubupl/patch-1
seblucas Apr 25, 2017
8de408b
Enhance the docs to show the default value used by the SMTP port if s…
seblucas Apr 26, 2017
c947deb
Links to all the docker container versions
CHBMB Apr 27, 2017
1f691ac
Fix COPS Basic Authentication
CHBMB Apr 27, 2017
fe78971
Update changelog
seblucas May 2, 2017
2d750d8
Translations update 01May2017. Thanks to horus68
seblucas May 2, 2017
ce3b535
Étiquette 1.1.1 ajoutée à la révision 0c7dc20d311f
seblucas May 3, 2017
fc6a26b
Prepare for next release
seblucas May 3, 2017
3928045
Fix the automatic generation of package into Github.
seblucas May 3, 2017
89f800f
Add a section in the README for future contributors. re #352
seblucas May 10, 2017
65e9440
Travis is failing to start PHP server on port 8888, try another one.
seblucas May 12, 2017
d2429b9
Moving PHP embedded server from 8888 to 8080 seems to work ... don't …
seblucas May 12, 2017
58dcd69
Update the contributing rules to specify that translations should be …
seblucas May 25, 2017
d7ce040
Bulgarian translation added
thorindwarf May 25, 2017
79c305c
With PHP7 being packaged by default with Ubuntu 16.04, Debian Stretch…
seblucas Jun 5, 2017
503c787
Try to update to Trusty image to get hhvm tested again.
seblucas Jun 5, 2017
9a68353
Fix the Debian Stretch installation requirements. fix #361
seblucas Jun 8, 2017
7307ddb
Try to fix travis error (certainly due to the change to npm5)
seblucas Jun 24, 2017
c8e63f8
Try to install it globally
seblucas Jun 25, 2017
248f12b
Translation updates - 14-09-2017
horus68 Sep 15, 2017
fab1fca
Update checkconfig output to better help users
seblucas Jan 5, 2018
7f857b9
Update the dependencies.
seblucas Jan 5, 2018
feed739
Merge
seblucas Jan 5, 2018
415cbbf
Some translation were still with LF instead of CRLF Fix that
seblucas Jan 5, 2018
07544b4
Update spanish and swedish translation from Transifex
seblucas Jan 5, 2018
cfc082b
Rename ukrainian translation
seblucas Jan 5, 2018
7a702ec
Partially fix the download of kepub.
seblucas Jan 7, 2018
6dc757a
Change the PHP version to 7.1 to avoid Scrutinizer crash
seblucas Jan 7, 2018
88a00f6
added view button to view pdf&epub in the browser
rockonedege Oct 25, 2017
6ce3610
added view button for boosttrap theme
rockonedege Oct 26, 2017
5355dcf
corrected Content-Disposition value to be inline
rockonedege Oct 26, 2017
cf50612
Fix coding style after merging the PR
seblucas Feb 25, 2018
34c249e
Simplify a little PR #374.
seblucas Feb 25, 2018
5db1403
Update fetch.php
cgxxx Feb 21, 2018
996f217
Translation updates - april-2018
horus68 Apr 9, 2018
5943c61
Update checkconfig.php on Database Error to better help a majority of…
shaunakg May 21, 2018
0b505bf
Updated from Font Awesome 3.2.1 to Font Awesome Free 5.0.13
seblucas May 22, 2018
467af43
Merge
seblucas May 22, 2018
e9cb877
Updated Changelog to prepare release.
seblucas May 22, 2018
f7ae89e
Add xmlwriter to list of dependencies (used in OPDS_renderer)
seblucas May 23, 2018
2ed9bad
Add a script to prepare a blank alpine container
seblucas May 23, 2018
025b6bb
Switch to linux EOL
seblucas May 23, 2018
dde7b1f
Add a credit for Jetbrains
seblucas Jun 26, 2018
812cf73
Let's release
seblucas Jun 26, 2018
1acc37d
Étiquette 1.1.2 ajoutée à la révision a8934d81cf99
seblucas Jun 26, 2018
4be6c55
Prepare next release
seblucas Jun 26, 2018
b311169
Update lock file
seblucas Jun 26, 2018
887d02f
Prepare next changelog
seblucas Jun 26, 2018
d44a369
[fix] Fix an error with PHP 7.2.X where create_function was deprecated
seblucas Jul 9, 2018
6cdd3fa
[fix] Hopefully fix the automatic uploading of releases
seblucas Jul 10, 2018
e263ed5
Update for year copyright notice
horus68 Jul 30, 2018
e39dee2
Language codes to names: fix 'hebrew' and add some more missing
isra00 Sep 7, 2018
5d004a4
Fixed the view button when URL Rewriting is enabled. re #402, #374
seblucas Oct 9, 2018
3b640ba
Use image full file names
Mar 18, 2019
2c56dc0
Add tag sort column
Mar 20, 2019
0a92114
Change localisation fr for tags
Mar 22, 2019
c39a6bf
[fix] Fix another problem with the view url, re #402, #374
seblucas Mar 31, 2019
e5cbf17
Updating language codes
horus68 Oct 19, 2018
add86b2
Update README.md
CHBMB Jan 21, 2019
2f24cbd
Add getThumbnail option for png files
Apr 22, 2019
d263fb2
Init image file name from epub file name
May 13, 2019
58a68e4
2019 copyright
horus68 Apr 1, 2019
703c283
Favicon for browser epubreader
horus68 May 30, 2019
61567fa
translations_june2019
horus68 Jun 17, 2019
39c9905
Updated dependencies, especially dot-php to fix #436, #419
seblucas Jun 19, 2019
c0ba770
Added a filler at the bottom of the book card to make sure the button…
seblucas Jun 19, 2019
d5c3a7f
[docs] Clarify the README to avoid confusion about COPS being a Nextc…
seblucas Jun 19, 2019
ada1ad6
[chore] Prepare changelog
seblucas Jun 19, 2019
7a1f157
[fix] Moved the header before the HTML to avoid `Cannot modify header…
seblucas Jun 19, 2019
551e720
[fix] Fixed an unstranslated string in filters. fix #304
seblucas Jun 22, 2019
7f540dd
[fix] Fix Jshint errors
seblucas Jun 22, 2019
306f7fb
Translations update - 20160923
horus68 Jun 23, 2019
f04d346
Favicon 2019
horus68 Jun 23, 2019
47e30ae
[chore] Update changelog
seblucas Jun 24, 2019
1a89d92
[chore] Prepare next version and fix changelog
seblucas Jun 24, 2019
571de06
[chore] Update composer.json with latest composer
seblucas Oct 13, 2019
3d8823f
[docs] Add mobi / azw mime type to the documentation
seblucas Oct 13, 2019
00e12e7
Translations updates 2019-10
horus68 Oct 14, 2019
6c32285
[setup] setup a backup database to test
May 21, 2020
2f5341f
test
May 26, 2020
d1f888d
Added bettercodehub badge
May 26, 2020
5ae4e0e
Added Jenkinsfile
May 26, 2020
a8f56bf
[feature] DieDump function for testing
Jun 2, 2020
56f3f2e
[test] added more concise tests for the search function
Jun 2, 2020
481deb7
[tests] search tests + removed &_Get implementation
Jun 2, 2020
85721cd
Removed dd call
Jun 3, 2020
9f8c12d
Changed default location of database to point to the demo included ve…
Jun 3, 2020
03da5a6
Sonar cube scanner
Jun 3, 2020
a704767
Sonar cube scanner mod
Jun 3, 2020
85342c0
Sonar cube scanner mod2
Jun 3, 2020
a9a4a1f
[tests] fix the broken mailtest
Jun 8, 2020
b33977f
[test] add email test
Jun 8, 2020
25002d9
[fix] mail test fix
Jun 8, 2020
c7d8d1f
Added login tests
Jun 8, 2020
4130ff8
Merge remote-tracking branch 'origin/master'
Jun 8, 2020
141baee
[test] check email not empty
Jun 8, 2020
7cc705d
Merge remote-tracking branch 'origin/master'
Jun 8, 2020
7783863
Teardown voor locolize tests
Jun 8, 2020
a96295f
[test] config tests
Jun 8, 2020
271ce91
[test] add template test
Jun 8, 2020
7e5d6f3
Fixed missing url init parameters
Jun 9, 2020
b40c84d
Fixed security vulnability
Jun 10, 2020
056e01f
Fixed security vulnability on css url building
Jun 10, 2020
1b51edc
Fixed security vulnability on css url building in the core
Jun 10, 2020
bc1a279
[fix] loop used for only 1 iteration
Jun 10, 2020
17bf55d
[fix] removed the loop for get the book id
Jun 10, 2020
bbfbf2d
[fix] seperated the sql querries
Jun 10, 2020
a1c35c5
[fix] removed the loop for get the book id
Jun 10, 2020
ba363dc
[fix] removed unused functions and variables
Jun 10, 2020
f68430e
[fix] refference to book changed to refference to sql file
Jun 10, 2020
95892da
[fix] compacted the custom code
Jun 10, 2020
2e4c535
Fixed magic value for template directory
Jun 10, 2020
e632d6d
Hotfix on typo
Jun 10, 2020
3e5cc3b
Added type cast to limit user controllable variable
Jun 10, 2020
3c22956
Added another typecast
Jun 10, 2020
8b7bd5b
[fix] fixes code smells
Jun 11, 2020
74caecc
Merge remote-tracking branch 'origin/master'
Jun 11, 2020
3af228d
[fix] removed unused variable
Jun 11, 2020
584dfb6
[fix] changed the template_dir in uppercase to show it's a const
Jun 11, 2020
5ca1d16
[fix] made the config const more clear
Jun 11, 2020
7bc3401
Sort by books_authors_link.id
SenorSmartyPants Nov 23, 2020
cb11279
Just convert book comment to xhtml
SenorSmartyPants Nov 24, 2020
66303ea
Copy bootstrap dir to bootstrap2
SenorSmartyPants Nov 30, 2020
8a3cf31
Add missing typeahead style
SenorSmartyPants Nov 30, 2020
2f4c4eb
Change search text and button to input-group
SenorSmartyPants Nov 18, 2020
59f55eb
Move search bar outside of the collapsible section
SenorSmartyPants Nov 18, 2020
85b62b8
Navbar style updates
SenorSmartyPants Nov 20, 2020
0177fb1
Don't set focus to query input
SenorSmartyPants Nov 21, 2020
ad5fafe
Change non-book (author,series,etc) layout
SenorSmartyPants Nov 21, 2020
87eec2f
Make whole panel clickable
SenorSmartyPants Nov 21, 2020
1efe5b1
Clearfix to align grid with different height books
SenorSmartyPants Nov 22, 2020
2fb4fe6
Books list:Remove view button, convert download links to dropdown button
SenorSmartyPants Nov 23, 2020
b158095
Remove tag display from book list
SenorSmartyPants Nov 23, 2020
e3d11e3
Change to flexbox style alignment of grid
SenorSmartyPants Nov 23, 2020
212b802
4 columns at tablet size instead of 3
SenorSmartyPants Nov 23, 2020
18f47dc
Major change to book list layout
SenorSmartyPants Nov 23, 2020
cf13c19
Book detail block layout changes
SenorSmartyPants Nov 24, 2020
2fa508f
Book Detail: remove line breaks publisher, lang, cust cols
SenorSmartyPants Nov 24, 2020
d044958
Book Detail: remove space before commas - Authors, Tags
SenorSmartyPants Nov 24, 2020
fdfbecb
Book Detail: remove permalink in front of title
SenorSmartyPants Nov 24, 2020
9270452
Book Detail: reformat series info
SenorSmartyPants Nov 24, 2020
20427b1
Book Detail: Remove 'Authors' heading
SenorSmartyPants Nov 24, 2020
a6d30ff
Book Detail: Remove open link
SenorSmartyPants Nov 24, 2020
fcc514d
Book Detail: Button group for each format
SenorSmartyPants Nov 24, 2020
ccd0d18
Book Detail: cover frame and shadow
SenorSmartyPants Nov 24, 2020
33851cd
Book Detail: Language and tag styling. Reorder some elements
SenorSmartyPants Nov 24, 2020
012754e
Explicitly set template to default instead of removing template cookie
SenorSmartyPants Nov 30, 2020
d41b618
Scroll by location hash
SenorSmartyPants Nov 30, 2020
4e0a100
Scroll directly to cover in bookdetail
SenorSmartyPants Nov 30, 2020
6e52beb
Support multiple themes by reading theme directory
SenorSmartyPants Nov 30, 2020
b2ec09f
Fix bootstrap2 links
SenorSmartyPants Nov 30, 2020
814771b
cops_ignored_formats list
SenorSmartyPants Dec 9, 2020
9ee94f7
Book Detail: add margin to tag buttons
SenorSmartyPants Dec 10, 2020
5838eac
Get book Identifiers from the database
SenorSmartyPants Dec 10, 2020
45d2779
Add Links Title for localization
SenorSmartyPants Dec 10, 2020
c4d7ea5
Merge branch 'book_authors_link'
SenorSmartyPants Feb 17, 2021
d63eda0
Merge branch 'FixThemeSwitch'
SenorSmartyPants Feb 17, 2021
2f046ed
Merge branch 'MultipleThemes'
SenorSmartyPants Feb 17, 2021
c3232b8
Merge branch 'IgnoreFormats'
SenorSmartyPants Feb 17, 2021
7a16350
Merge branch 'Identifiers'
SenorSmartyPants Feb 17, 2021
0d569de
Merge branch 'bootstrap'
SenorSmartyPants Feb 17, 2021
86ff04a
Book Detail: Display identifiers
SenorSmartyPants Feb 17, 2021
0f93c2c
Merge branch 'bootstrap'
SenorSmartyPants Feb 17, 2021
65f0b89
config_local examples for ignored formats
SenorSmartyPants Feb 17, 2021
04d993c
Updated config_default to bootstrap2 values
SenorSmartyPants Feb 17, 2021
4901d4a
Explicitly set template to default instead of removing template cookie
SenorSmartyPants Feb 19, 2021
6b61ac9
Remove composer.lock
May 17, 2021
e4ff7c4
Update fetch.php to lower memory consumption
allandanton Sep 14, 2022
24b031f
make installable
mikespub Mar 19, 2023
bad594d
php-cs-fixer with @PSR12 rules
mikespub Mar 19, 2023
4cc917c
php-cs-fixer with @PHP80Migration rules
mikespub Mar 19, 2023
072e9bf
move seblucas packages to resources
mikespub Mar 19, 2023
890f250
php-cs-fixer with @PSR12 rules for resources
mikespub Mar 19, 2023
71dcc80
php-cs-fixer with @PHP80Migration rules for resources
mikespub Mar 19, 2023
80e0d05
update phpunit tests
mikespub Mar 19, 2023
904a20e
add .gitremotes
mikespub Mar 19, 2023
6b998fb
fix tests
mikespub Mar 21, 2023
d8a69b2
add phpstan baseline + fix
mikespub Mar 21, 2023
7549ecf
remove dependency on composer 1.x by using asset-packagist
mikespub Mar 21, 2023
7f864d9
start adding packages with yarn
mikespub Mar 21, 2023
f3256b3
update composer files
mikespub Mar 23, 2023
0d1ef7f
add docker compose
mikespub Mar 24, 2023
cc5aa72
fix tests for PHP 8.2
mikespub Mar 24, 2023
58306bf
Merge commit 'refs/pull/518/head' of https://github.com/seblucas/cops
mikespub Mar 24, 2023
c9fba4c
update composer + fix build
mikespub Mar 24, 2023
9fd4fd9
Merge branch 'master' of https://github.com/SenorSmartyPants/cops int…
mikespub Mar 25, 2023
3bbcbbf
fix db=0 issue
mikespub Mar 25, 2023
f74ec37
Merge commit 'refs/pull/424/head' of https://github.com/seblucas/cops…
mikespub Mar 25, 2023
eba2566
new phpstan baseline
mikespub Mar 25, 2023
556bcfb
update CHANGELOG
mikespub Mar 25, 2023
c81e619
Merge remote-tracking branch 'peltos/master' into peltos
mikespub Mar 25, 2023
7815021
initialize URL params
mikespub Mar 25, 2023
de9871e
fix serverside rendering by default
mikespub Mar 25, 2023
00217fd
Improve tests and security
mikespub Mar 25, 2023
340a5a1
put image name in docker compose files
mikespub Mar 26, 2023
3d83fed
update npm asset dependencies
mikespub Mar 26, 2023
7bfda21
add README for monocle
mikespub Mar 26, 2023
e2e812a
update version
mikespub Mar 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.git/
*.zip
test/
# keep the test database in the image here
!test/BaseWithSomeBooks/
vendor/
# remove docker files
docker/
docker-compose.yaml
docker-compose-dev.yaml
# remove development files
.vscode/
.yarn/
#!.yarn/releases
#!.yarn/plugins
.pnp.*
# remove unused directories
resources/epub-loader/
resources/tbszip/stuffs/
resources/php-epub-meta/assets/
resources/php-epub-meta/test/
tools/
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/feedbook/*
/coverage/*
/saucetest/*
/thumbnails/*
/vendor/
/clover.xml
/test/text.atom
/*.phar
/cops.zip
/cops-*.zip
/cops.sublime-*
/config_local.php
/config_local.*.php
.yarn/*
#!.yarn/releases
#!.yarn/plugins
.pnp.*
.editorconfig
.gitattributes
3 changes: 3 additions & 0 deletions .gitremotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[remote "upstream"]
url = https://github.com/seblucas/cops.git
fetch = +refs/heads/*:refs/remotes/upstream/*
2 changes: 0 additions & 2 deletions .hgignore

This file was deleted.

14 changes: 14 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ aca483636af460c93f9817e083e85d1976aa1b7d 0.3.1
5888006bc559842de0364ec3e67f641aa1653d0e 0.3.2
2ff58ed42cecf00b24d981426dff507fa1e86c20 0.3.3
3cdee8daedf28e6611203ce90c90bb8906003e22 0.3.4
89ed9654ac9c5de1695f63992aa92d55ef82f2b9 0.4.0
07e901e7e35334e3747358ac5ba829347696a5d6 0.5.0
4525a844482c54b57cf394887541f6c483c429d7 0.6.0
ef69515ccafa912360c35a23e303cb180d7e95b9 0.6.1
605e2b671bf46530fed4a13b2c5924ef1266b132 0.6.2
2e7fb43f056b5694720b5eaedc2a9a2b7d2507f6 0.9.0
3fda691df53aacdec7c017e576d5eefb47a7aa1b 1.0.0RC1
0fc8e1890d9be461f734bb5f93295a5af497d929 1.0.0RC2
681dce395a601d04a60ee5505a57b861a234f472 1.0.0RC3
728d8d2062b27af51e02330bc67633d3ade0101e 1.0.0
87a31fd7b1de76b704d81d85ac3a8c5c18e8f441 1.0.1
e61fd2d791c5801b8fa67bb403305287a4ee0a49 1.1.0
0c7dc20d311f5a60780461c69b0d2e22d175f1b0 1.1.1
a8934d81cf995c408eef0e6088e925d295775c34 1.1.2
55 changes: 53 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
DirectoryIndex index.php

<IfModule mod_xsendfile.c>
<Files fetch.php>
XSendFile on
XSendFile on
</Files>
</IfModule>

Expand All @@ -13,23 +15,72 @@

###########################################
# On WAMP one user had to add this line in his httpd.conf
# None of the abose was working
# None of the above was working
###########################################
#XSendFilePath <YourCalibrePath>

###########################################
# If you want to use user based configuration with
# apache 2.4 + php-fpm enable this
# https://github.com/seblucas/cops/issues/213
###########################################
#SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^download/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub [L]
RewriteRule ^view/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub&view=1 [L]
RewriteRule ^download/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3 [L]
RewriteRule ^view/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3&view=1 [L]
RewriteRule ^download/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub [L]
RewriteRule ^view/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub&view=1 [L]
RewriteRule ^download/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2 [L]
RewriteRule ^view/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2&view=1 [L]
</IfModule>

<IfModule mod_expires.c>
ExpiresActive on

# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xhtml+xml "access plus 0 seconds"

# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"

# Media: images
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"

# Webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
</IfModule>

###########################################
# Uncomment if you wish to protect access with a password
###########################################
# If your covers and books are not available as soon as you protect it
# You can try replacing the FilesMatch directive by this one
# <FilesMatch "(index|feed)\.php">
# it helps for Sony PRS-TX and Aldiko, but beware fetch.php can be accessed
# without authentication (see $config ['cops_fetch_protect'] for a workaround).
###########################################
#<FilesMatch "\.php$">
#AuthUserFile /path/to/file
#AuthGroupFile /dev/null
#AuthName "Acces securise"
#AuthType Basic
#Require valid-user
#</FilesMatch>
142 changes: 142 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
filter:
excluded_paths:
- 'resources/*'
- 'test/*'
- 'tools/*'
dependency_paths:
- 'vendor/*'

checks:
php:
fix_php_opening_tag: true
remove_php_closing_tag: true
avoid_closing_tag: true
one_class_per_file: true
side_effects_or_types: true
no_mixed_inline_html: false
require_braces_around_control_structures: true
php5_style_constructor: true
no_global_keyword: true
avoid_usage_of_logical_operators: true
psr2_class_declaration: true
no_underscore_prefix_in_properties: false
no_underscore_prefix_in_methods: false
blank_line_after_namespace_declaration: true
single_namespace_per_use: false
psr2_switch_declaration: true
psr2_control_structure_declaration: false
avoid_superglobals: false
security_vulnerabilities: true
no_exit: false
uppercase_constants: true
return_doc_comments: true
remove_extra_empty_lines: true
properties_in_camelcaps: true
prefer_while_loop_over_for_loop: true
phpunit_assertions: true
parameter_doc_comments: true
optional_parameters_at_the_end: true
no_long_variable_names:
maximum: '20'
no_goto: true
function_in_camel_caps: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: false
order_alphabetically: true
encourage_single_quotes: true
encourage_postdec_operator: true
classes_in_camel_caps: true
avoid_multiple_statements_on_same_line: true
avoid_fixme_comments: true

javascript:
valid_typeof: true
yoda:
setting: 'Disallow Yoda Conditions'
wrap_iife: true
no_use_before_define: true
no_unused_vars: true
no_unreachable: true
no_undef: true
no_trailing_spaces: true
no_space_before_semi: true
no_shadow: true
no_self_compare: true
no_script_url: true
no_return_assign: true
no_reserved_keys: true
no_redeclare: true
no_mixed_spaces_and_tabs: true
no_loop_func: true
no_irregular_whitespace: true

coding_style:
php:
spaces:
around_operators:
concatenation: true
ternary_operator:
before_condition: false
after_condition: false
before_alternative: false
after_alternative: false
other:
after_type_cast: false
braces:
classes_functions:
class: new-line
function: new-line
closure: end-of-line
if:
opening: end-of-line
for:
opening: end-of-line
while:
opening: end-of-line
do_while:
opening: end-of-line
switch:
opening: end-of-line
try:
opening: end-of-line
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower

tools:
php_analyzer: true
php_code_sniffer:
config:
standard: "PSR2"
php_cs_fixer:
enabled: true
config: { level: psr2 }
php_mess_detector: true
php_loc:
enabled: true
excluded_dirs: [vendor]
php_code_coverage:
test_command: vendor/bin/phpunit

build:
environment:
timezone: "Europe/Berlin"
php: "7.1.12"
mysql: false
postgresql: false
redis: false
dependencies:
before:
- sudo composer selfupdate
- composer global require "fxp/composer-asset-plugin:~1.1"
tests:
override:
-
command: "vendor/bin/phpunit"
coverage:
file: "clover.xml"
format: "clover"
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
language: php
dist: trusty

matrix:
include:
- php: "5.4"
- php: "5.5"
- php: "5.6"
addons:
sauce_connect: true
hosts:
- cops-travis
- php: "7.0"
- php: "hhvm"
allow_failures:
- php: "hhvm"
- php: "5.5"
- php: "5.4"

before_script:
- composer selfupdate
- composer global require "fxp/composer-asset-plugin:~1.1"
- 'if [ "${TRAVIS_PHP_VERSION}" = "5.5" ] || [ "${TRAVIS_PHP_VERSION}" = "5.4" ]; then rm composer.lock && sed -i "/platform/d" composer.json ; fi'
- composer install
- npm install -g jshint
- jshint --version
script:
- vendor/bin/phpunit
- jshint --verbose --show-non-errors util.js
- php test/coverage-checker.php clover.xml 45
after_success:
- chmod +x test/prepareSauceTest.sh
- test/prepareSauceTest.sh
env:
global:
- SAUCE_USERNAME=seblucas
- secure: VVxocvmz6WYr3tZSTA42M/LUhaHoBWw5onh85hnquoMaxspd3tDCyfQIowTTmEXikRh2T0CkTH7X3dhVwRTd/Ha9isja1qDo9Lc2flGCoWICF7WFZuom084+d+O+EWx4WZMAw4Lz4w6a5xflpPKnzNs9B0+de0BdTlQ5qSXVrcA=

sudo: false

before_deploy:
- composer install --no-dev --optimize-autoloader
- wget http://www.phing.info/get/phing-latest.phar
- php phing-latest.phar
- export RELEASE_FILE=$(ls ./cops-*.zip)

deploy:
provider: releases
api_key:
secure: nUQ6uX4+x3VtyrtKjHANl3zLyc0Q9qe2O10ufOFBgcQwWETrE6Gk+Rwn/Kz6OJkg0AGfioptvjh8c28ELV98M+KmhiwhT1VQgs3pa6x9CbggA8fdbGUCq+SC8lnU7MBYIO5gZ36F3RfPwXxXkd09bajiVLbI024IqFSIAONzLXw=
skip_cleanup: true
file:
- "${RELEASE_FILE}"
on:
tags: true
repo: seblucas/cops
php: 5.6

cache:
directories:
- $HOME/.composer/cache
Loading