Commit 8aa9061e authored by Seamus Lee's avatar Seamus Lee

Add in post composer file to add in civicrm custom comment and test if class_exists or not

parent 0df41a8e
......@@ -33,11 +33,13 @@
"scripts": {
"post-install-cmd": [
"bash tools/scripts/composer/dompdf-cleanup.sh",
"bash tools/scripts/composer/tcpdf-cleanup.sh"
"bash tools/scripts/composer/tcpdf-cleanup.sh",
"bash tools/scripts/composer/pear-execption-fix.sh"
],
"post-update-cmd": [
"bash tools/scripts/composer/dompdf-cleanup.sh",
"bash tools/scripts/composer/tcpdf-cleanup.sh"
"bash tools/scripts/composer/tcpdf-cleanup.sh",
"bash tools/scripts/composer/pear-execption-fix.sh"
]
}
}
#!/bin/bash
## Cleanup the vendor tree. The main issue here is that civi Civi is
## deployed as a module inside a CMS, so all its source-code gets published.
## Some libraries distribute admin tools and sample files which should not
## be published.
##
## This script should be idempotent -- if you rerun it several times, it
## should always produce the same post-condition.
## Replace a line in a file
## This is a bit like 'sed -i', but dumber and more cross-platform.
function simple_replace() {
php -r 'file_put_contents($argv[1], preg_replace($argv[2], $argv[3], file_get_contents($argv[1])));' "$@"
}
# add in class_exists test as per CRM-8921.
simple_replace vendor/pear/pear_exception/PEAR/Exception.php '^\<\?php^' '<?php
// CRM-8921
if ( class_exists( "'"PEAR_Exception"'" ) ) {
return;
}' /home/seamus/test.php
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment