Skip to content

Commit

Permalink
Some adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchi committed Oct 10, 2024
1 parent 9288252 commit ff83869
Show file tree
Hide file tree
Showing 14 changed files with 1,017 additions and 159 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ web/behatdata
web/behatfaildumps
web/phpunitdata
.vscode
bin/moodleextra/*
bin/moodleextra/*
/vendor/
diffs
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,27 @@ The basic workflow is to:
- get the version of Moodle you want to test/develop against
- add any plugins you want test/develop
- start up docker
- install Moodle
- install Moodle

## Phan

Static analysis tools

* https://www.php.net/manual/en/appendices.php PHP Deprecations
* https://github.com/phan/phan/wiki/Getting-Started#creating-a-config-file
* https://odan.github.io/2020/12/22/php8-compatibility-check.html
* https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base

## PHPDD

I've included PHP Deprecation Detector in the composer file. Install this to use.

```
// Checks that the whole html folder is compatible after PHP 7.4 to PHP 8.0 and outputs to php80.txt file.
// This excludes some development folders and 3rd party library folders that we have no control over, but if you
// want to do a full-full scan remove the exclude list.
./vendor/bin/phpdd scan -t 8.0 -a 7.4 -e codechecker,moodlecheck,node_modules,vendor web/html/ > phpdd.txt
// You can change the path to check individual plugins e.g.
./vendor/bin/phpdd scan -t 8.0 -a 7.4 web/html/blocks/checklist
```
7 changes: 7 additions & 0 deletions assets/web/apache2/apache2_conf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<IfModule mpm_prefork_module>
StartServers 15
MinSpareServers 15
MaxSpareServers 20
MaxRequestWorkers 250
MaxConnectionsPerChild 0
</IfModule>
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions assets/web/php-ini/apache2_php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ opcache.enable_cli = 1
opcache.max_accelerated_files = 15000
zlib.output_compression = 1
x-debug = 1
upload_max_filesize=100MB
post_max_size=100MB
48 changes: 0 additions & 48 deletions assets/web/vhost.conf

This file was deleted.

14 changes: 14 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "sharpm/sol40dev",
"require-dev": {
"wapmorgan/php-deprecation-detector": "^2.0",
"phpcompatibility/php-compatibility": "*"
},
"authors": [
{
"name": "Mark Sharp",
"email": "[email protected]"
}
],
"require": {}
}
Loading

0 comments on commit ff83869

Please sign in to comment.