Skip to content

Commit

Permalink
update phplint version
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Jul 5, 2021
1 parent 7d41113 commit fef5e45
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
sudo php -S 0.0.0.0:80 -t public_html > /dev/null 2>&1 &
- name: Check PHP syntax errors
uses: overtrue/phplint@2.3.5
uses: overtrue/phplint@2.4.1
with:
path: ./public_html
options: --exclude=base/vendor
Expand Down
20 changes: 8 additions & 12 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
## below

Vagrant.configure("2") do |config|
config.vagrant.plugins = [
"vagrant-docker-compose",
]
config.vm.box = "ubuntu/bionic64"
config.vm.provision :docker
config.vm.provision :docker_compose,
compose_version: "1.22.0"
config.vm.network "public_network"

config.vm.provider "virtualbox" do |v|
v.memory = 10640
Expand All @@ -31,9 +26,7 @@ Vagrant.configure("2") do |config|
apt install software-properties-common
add-apt-repository ppa:ondrej/php
DEBIAN_FRONTEND=noninteractive apt update
DEBIAN_FRONTEND=noninteractive apt install -y composer mariadb-client mariadb-server postfix chromium-chromedriver firefox openjdk-8-jre-headless fonts-liberation
DEBIAN_FRONTEND=noninteractive apt install -y php7.0 php7.0-mbstring php7.0-curl php7.0-mysql php7.0-xml php7.0-zip
DEBIAN_FRONTEND=noninteractive apt install -y php7.1 php7.1-mbstring php7.1-curl php7.1-mysql php7.1-xml php7.1-zip
DEBIAN_FRONTEND=noninteractive apt install -y make mariadb-client mariadb-server postfix chromium-chromedriver firefox openjdk-8-jre-headless fonts-liberation xdg-utils
DEBIAN_FRONTEND=noninteractive apt install -y php7.2 php7.2-mbstring php7.2-curl php7.2-mysql php7.2-xml php7.2-zip
DEBIAN_FRONTEND=noninteractive apt install -y php7.3 php7.3-mbstring php7.3-curl php7.3-mysql php7.3-xml php7.3-zip
DEBIAN_FRONTEND=noninteractive apt install -y php7.4 php7.4-mbstring php7.4-curl php7.4-mysql php7.4-xml php7.4-zip
Expand All @@ -49,17 +42,20 @@ Vagrant.configure("2") do |config|
update-alternatives --set phpize /usr/bin/phpize$PHPVERSION
update-alternatives --set php-config /usr/bin/php-config$PHPVERSION
[[ ! -z $(which google-chrome) ]] || {
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
[[ ! -f google-chrome-stable_current_amd64.deb ]] && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
}
google-chrome --version
rm -rf vendor
composer install
bin/update-composer.sh
sudo -u vagrant php composer.phar update
ln -s /vagrant/vendor/bin/chromedriver /usr/local/bin/chromedriver
ln -s /vagrant/vendor/bin/geckodriver /usr/local/bin/geckodriver
service postfix stop
service apache2 stop
service mysqld start
cp -fv tests/ci/config.php public_html/lists/config/config.php
cp -fv tests/default.behat.yml tests/behat.yml
cp -fv tests/ci/behat.yml tests/behat.yml
[[ ! -d public_html/lists/admin/ui/phplist-ui-bootlist ]] && {
cd public_html/lists/admin/ui/
wget https://github.com/phpList/phplist-ui-bootlist/archive/master.tar.gz
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 32 additions & 3 deletions public_html/lists/config/config.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/*
* ==============================================================================================================
*
*
Expand All @@ -10,25 +12,38 @@
* ** NOTE: To use options from config_extended.php, you need to copy them to this file **
*
==============================================================================================================
*/

// what is your Mysql database server hostname
$database_host = 'dbhost';
$database_host = 'localhost';

// what is the name of the database we are using
$database_name = 'phplistdb';

// what user has access to this database
$database_user = 'phplist';

// and what is the password to login to control the database
$database_password = 'phplist';

// if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
//# if your SMTP server is called "smtp.mydomain.com" you enter this below like this:
//#
//# define("PHPMAILERHOST",'smtp.mydomain.com');
define('PHPMAILERHOST', '');

define('PHPMAILERHOST', 'localhost');
define('PHPMAILERPORT',2500);
define('PHPMAILER_SECURE',false);


// if TEST is set to 1 (not 0) it will not actually send ANY messages, but display what it would have sent
// this is here, to make sure you edited the config file and mails are not sent "accidentally"
// on unmanaged systems
define('TEST', 1);

define('TEST', 0);
/*
==============================================================================================================
*
* Settings for handling bounces
Expand All @@ -38,46 +53,60 @@
* unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole
*
==============================================================================================================
*/

// Message envelope.

// This is the address that most bounces will be delivered to
// Your should make this an address that no PERSON reads
// but a mailbox that phpList can empty every so often, to process the bounces

// $message_envelope = 'listbounces@yourdomain';

// Handling bounces. Check README.bounces for more info
// This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';

// set this to 0, if you set up a cron to download bounces regularly by using the
// commandline option. If this is 0, users cannot run the page from the web
// frontend. Read README.commandline to find out how to set it up on the
// commandline
define('MANUALLY_PROCESS_BOUNCES', 1);

// when the protocol is pop, specify these three
$bounce_mailbox_host = 'localhost';
$bounce_mailbox_user = 'popuser';
$bounce_mailbox_password = 'password';

// the "port" is the remote port of the connection to retrieve the emails
// the default should be fine but if it doesn't work, you can try the second
// one. To do that, add a # before the first line and take off the one before the
// second line
$bounce_mailbox_port = '110/pop3/notls';
//$bounce_mailbox_port = "110/pop3";

// it's getting more common to have secure connections, in which case you probably want to use
//$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

// when the protocol is mbox specify this one
// it needs to be a local file in mbox format, accessible to your webserver user
$bounce_mailbox = '/var/mail/listbounces';

// set this to 0 if you want to keep your messages in the mailbox. this is potentially
// a problem, because bounces will be counted multiple times, so only do this if you are
// testing things.
$bounce_mailbox_purge = 1;

// set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
// messages are messages that could not be matched with a user in the system
// messages are still downloaded into phpList, so it is safe to delete them from
// the mailbox and view them in phpList
$bounce_mailbox_purge_unprocessed = 1;

// how many bounces in a row need to have occurred for a user to be marked unconfirmed
$bounce_unsubscribe_threshold = 5;

// choose the hash method for password
// check the extended config for more info
// in most cases, it is fine to leave this as it is
Expand Down
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ createdb:
mysql -e 'grant all on phplistdb.* to phplist@"%" identified by "phplist"; FLUSH PRIVILEGES;'

test: createdb
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags=@initialise
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags="~@initialise && ~@wip"
../vendor/bin/behat -n -fprogress -p goutte --strict --stop-on-failure --tags=@initialise
../vendor/bin/behat -n -fprogress -p goutte --strict --stop-on-failure --tags="~@initialise && ~@wip"

verbosetest: createdb
../vendor/bin/behat -n -p chrome --strict --stop-on-failure --tags=@initialise
Expand Down

0 comments on commit fef5e45

Please sign in to comment.