-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: bitbucket.org/b23prodtm/php-cms/pull-requests/20/article-model/
- Loading branch information
Showing
1,174 changed files
with
17,462 additions
and
6,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# PHP CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-php/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
environment: | ||
DB: Mysql | ||
# a host alias or IP address | ||
MYSQL_SERVICE_HOST: 192.168.99.100 | ||
MYSQL_SERVICE_PORT: 3306 | ||
TEST_MYSQL_SERVICE_HOST: 192.168.99.100 | ||
TEST_MYSQL_SERVICE_PORT: 3306 | ||
DATABASE_NAME: phpcms | ||
DATABASE_SERVICE_NAME: MYSQL | ||
#(optional) | ||
#WEBHOOK_URL: <discordapp-url> | ||
# Persistent connection credentials | ||
DATABASE_USER: root | ||
# overrides docker-compose-alias.sh -p=<password> | ||
DATABASE_PASSWORD: pdocker | ||
# Just add TEST_DATABASE_USER and TEST_DATABASE_PASSWORD | ||
TEST_DATABASE_USER: ubuntu | ||
# overrides docker-compose-alias.sh -t=<password> | ||
TEST_DATABASE_PASSWORD: ptest | ||
# CakePHP generated | ||
#CAKEPHP_SECRET_TOKEN: <secret-token> | ||
#CAKEPHP_SECRET_SALT: <secret-salt> | ||
#CAKEPHP_SECURITY_CIPHER_SEED: <cipher-seed> | ||
# Generated by ./configure.sh -h | ||
GET_HASH_PASSWORD: ${GET_HASH_PASSWORD} | ||
docker: | ||
# Specify the version you desire here | ||
- image: circleci/php:7.1-node-browsers | ||
environment: | ||
DOCKER_OS_NAME: linux | ||
DOCKER_PHP_VERSION: 7.1 | ||
|
||
# Specify service dependencies here if necessary | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
# Using the RAM variation mitigates I/O contention | ||
# for database intensive operations. | ||
# - image: circleci/mysql:5.7-ram | ||
- image: circleci/mysql:5.7 | ||
container_name: mysql | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_ROOT_PASSWORD: 'pdocker' | ||
MYSQL_DATABASE: phpcms | ||
|
||
steps: | ||
- checkout | ||
- run: git submodule update --init --recursive | ||
|
||
- run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev | ||
- run: sudo docker-php-ext-install zip | ||
- run: sudo apt-get install mariadb-client | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
# "composer.lock" can be used if it is committed to the repo | ||
- v1-dependencies-{{ checksum "composer.lock" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: composer install -n --prefer-dist | ||
|
||
- save_cache: | ||
key: v1-dependencies-{{ checksum "composer.lock" }} | ||
paths: | ||
- ./app/Vendor/ | ||
|
||
- run: ./test-cake.sh -v --docker -p=$DATABASE_PASSWORD -t=$TEST_DATABASE_PASSWORD #| grep Test | ||
# Installing and Using docker-compose | ||
- run: | ||
name: Install Docker Compose | ||
command: | | ||
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose | ||
chmod +x ~/docker-compose | ||
sudo mv ~/docker-compose /usr/local/bin/docker-compose | ||
- setup_remote_docker: # (2) | ||
docker_layer_caching: true # (3) | ||
|
||
# use a primary image that already has Docker (recommended) | ||
# build and push Docker image | ||
# (4) | ||
- run: | | ||
TAG=0.1.$CIRCLE_BUILD_NUM | ||
./docker-compose-alias.sh -dns=b23prodtm.info -p=$DATABASE_PASSWORD -t=$TEST_DATABASE_PASSWORD up -d --build | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push b23dkr/myphpcms:$TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.bat] | ||
end_of_line = crlf | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Define the line ending behavior of the different file extensions | ||
# Set default behaviour, in case users don't have core.autocrlf set. | ||
* text=auto | ||
* text eol=lf | ||
|
||
# Explicitly declare text files we want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.php text | ||
*.default text | ||
*.ctp text | ||
*.sql text | ||
*.md text | ||
*.po text | ||
*.js text | ||
*.css text | ||
*.ini text | ||
*.properties text | ||
*.txt text | ||
*.xml text | ||
*.yml text | ||
.htaccess text | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.bat eol=crlf | ||
|
||
# Declare files that will always have LF line endings on checkout. | ||
*.pem eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mo binary | ||
*.pdf binary | ||
*.woff binary | ||
*.ttf binary | ||
*.eot binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,42 @@ | ||
/nbproject/private/ | ||
# User specific & automatically generated files # | ||
################################################# | ||
myphpcms*.zip | ||
/app/Config/database.php* | ||
/app/Config/database.sql* | ||
/app/tmp | ||
/app/Vendor/ | ||
!/app/Vendor/autoload.php | ||
/app/webroot/e13/nbproject/private/ | ||
/app/tmp/cache/ | ||
/app/tmp/logs/ | ||
/app/tmp/persistent/ | ||
/app/tmp/sessions/ | ||
/app/webroot/php-cms/e13/nbproject/private/ | ||
!*empty | ||
!*empty | ||
/lib/Cake/Console/Templates/skel/tmp/ | ||
/plugins | ||
/vendor | ||
/build | ||
/dist | ||
/tags | ||
*.mo | ||
/bin/composer.phar | ||
|
||
# IDE and editor specific files # | ||
################################# | ||
/nbproject | ||
.idea | ||
/.project | ||
/.buildpath | ||
/.settings/ | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db | ||
/nbproject/private/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[submodule "app/webroot/php-cms"] | ||
path = app/webroot/php-cms | ||
url = https://b23prodtm@bitbucket.org/b23prodtm/php-cms.git | ||
[submodule "markdown-cakephp"] | ||
path = markdown-cakephp | ||
url = https://github.com/maurymmarques/markdown-cakephp.git | ||
[submodule "app/Plugin/Markdown"] | ||
path = app/Plugin/Markdown | ||
url = https://github.com/maurymmarques/markdown-cakephp.git | ||
url = https://github.com/b23prodtm/markdown-plugin.git | ||
[submodule "app/webroot/php_cms"] | ||
path = app/webroot/php_cms | ||
url = https://bitbucket.org/b23prodtm/php-cms.git | ||
[submodule ".travis/TravisCI-OSX-PHP"] | ||
path = .travis/TravisCI-OSX-PHP | ||
url = https://github.com/b23prodtm/TravisCI-OSX-PHP.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine on | ||
RewriteCond %{REQUEST_URI} !^/health.php$ | ||
RewriteRule ^$ app/webroot/ [L] | ||
RewriteRule (.*) app/webroot/$1 [L] | ||
</IfModule> | ||
RewriteEngine on | ||
# Uncomment if you have a .well-known directory in the root folder, e.g. for the Let's Encrypt challenge | ||
# https://tools.ietf.org/html/rfc5785 | ||
#RewriteRule ^(\.well-known/.*)$ $1 [L] | ||
RewriteRule ^$ app/webroot/ [L] | ||
RewriteRule (.*) app/webroot/$1 [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
branches: | ||
ignore: ['2.x', '2.next'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
cache: | ||
directories: | ||
- app/tmp/cache | ||
- ".autoconf" | ||
- "$HOME/.composer/cache/files" | ||
# language: php # linux only | ||
language: bash # cross-platform | ||
|
||
os: | ||
- linux | ||
- osx | ||
- windows | ||
|
||
dist: xenial | ||
|
||
env: | ||
matrix: | ||
- _PHP=latest _PKG=hhvm | ||
- _PHP=7.1 _PKG=php | ||
- _PHP=7.2 _PKG=php | ||
- _PHP=7.3 _PKG=php | ||
global: | ||
- _SSL=openssl | ||
- DB=Mysql | ||
- PHPUNIT=4 | ||
- PHPCS=3 | ||
- COLLECT_COVERAGE=false | ||
- PHPENV_ROOT=/usr/local/bin/phpenv | ||
- WEBHOOK_URL=https://discordapp.com/api/webhooks/479745392880386058/YOO7Nnn1IFWUtXX0n0qAZYeMDeV-SLa0lSzjGpNnKGTzG-xA0T3dplVGzSM4ObKLeMWg | ||
- secure: C39DQ1zYpSAOy33Sb8NP89o6k4HUnjHnQ+bQkgbo3WH7WtiN76dGeO9jm1DjMn5np6oKbDi41/fxonaTUIjb9YMksG2YB+NBDYXHyV1H7/xAeC6uTxwUObrLXh8aOUwiiuLPllMdtOLX8JSPxl1Ixc6KyeFywPiMvwuOe4QZW6sVG4sqhZC/UUycYKRSMaOthtuTDPYKjBLaDPiEzkUmdBIo9IhAsidEFAHj4jEmw9gBtac0B2x7GbvvoDivdH3KdNSoPt2SkD0RLX51Qf7AYeAV4fw65cuCp/Aat/uk55x3lN5g18Ww9khY/cFSwPC0JXGQnnJvdcDP2diZNkqE41Yc/Mw3xwfrvp3/v8js3VIBzsGINKiSdXZ/yXqI9iRzvzlfmXRHvd4sFXRzUpi8ZB4PXaboMndbNRoh4PcoRNFtXhyebQCEgZv2x3oiKXw38WT5cga03uMH4E5z5afS3n7NP1tsuiNWd499dJzAkW8OPeLDPqY3a/b5qLeZIK1bo23mvCjPtbm+B2g2QocKcd1oQ+XANCyuT3M/+AIypdMabGOSon2fDKrUUN+SqIX4FcYaHi1sG3qUp23870u9YcT4hK2LCKBcBPkFpxqEZLwdHbJmjHPo6uRyAKOD7r/k1DtIRqkcJ+5BpU4emo6rM9rdh5mWjLtK7vdY8Y/tvP8= | ||
|
||
matrix: | ||
fast_finish: true | ||
exclude: | ||
- os: windows | ||
- os: linux | ||
include: | ||
- os: linux | ||
language: php | ||
php: 7.1 | ||
env: _PHP=7.1 _PKG=php PHPENV_ROOT=~/.phpenv | ||
- os: linux | ||
language: php | ||
php: 'hhvm' | ||
env: _PHP=latest _PKG=hhvm PHPENV_ROOT=~/.phpenv | ||
- os: osx | ||
- os: windows | ||
env: _PHP=7.3 _PKG=php _SSL=openssl.light | ||
- os: windows | ||
env: _PHP=latest _PKG=hhvm _SSL=openssl.light | ||
allow_failures: | ||
- php: 'hhvm' | ||
- env: _PHP=latest _PKG=hhvm | ||
- env: _PHP=7.3 _PKG=php | ||
- os: windows | ||
|
||
addons: | ||
coverity_scan: | ||
project: | ||
name: b23prodtm/myphpcms | ||
description: 'This PHP CMS is featuring well-known functionalities as cool as | ||
posting some web contents with pictures stored in a database. Developer Note | ||
: This is the Cake PHP cartridge repository. A submodule is included in app/webroot.' | ||
notification_email: b23prodtm@users.sourceforge.net | ||
build_command_prepend: ./configure.sh "-c" "-h" "-p" "pass" "-s" "word" "--mig-database" | ||
"-y" && .travis/configure.sh | ||
build_command: "./test-cake.sh --cov | grep Test" | ||
branch_pattern: coverity_scan | ||
apt: | ||
packages: | ||
- php7.0 | ||
- php7.0-xml | ||
- hhvm | ||
update: true | ||
|
||
services: | ||
- memcached | ||
|
||
before_install: | ||
- cd .travis/TravisCI-OSX-PHP | ||
- source build/phpenv_install.sh | ||
- source build/prepare_${TRAVIS_OS_NAME}_env.sh #; source exports | ||
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "${_PHP}" == 7* ]]; then COLLECT_COVERAGE=true ; fi | ||
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "${COLLECT_COVERAGE}" != "true" ]]; then phpenv config-rm xdebug.ini || true ; fi | ||
- if [ ! -z "${ADDITIONAL_PHP_INI}" ]; then source build/custom_php_ini.sh; fi | ||
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "${COLLECT_COVERAGE}" != "true" ]]; then echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-; fi | ||
- cd ../.. | ||
- source ./Scripts/configure_tmp.sh | ||
install: | ||
- cd .travis/TravisCI-OSX-PHP | ||
- if [[ "${TRAVIS_OS_NAME}" != "linux" ]]; then build/handle_${TRAVIS_OS_NAME}_pkg.sh "${_SSL}"; /usr/local/opt/openssl/bin/c_rehash; fi | ||
- if [[ "${TRAVIS_OS_NAME}" != "linux" ]]; then build/handle_${TRAVIS_OS_NAME}_pkg.sh "${_PKG}" "${_PHP}" "--with-openssl"; fi | ||
- if [[ "${TRAVIS_OS_NAME}" != "linux" ]]; then build/handle_${TRAVIS_OS_NAME}_pkg.sh "composer"; bash -c 'composer install --dev --no-interaction'; fi | ||
- cd ../.. | ||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then curl -s http://getcomposer.org/installer | php && php composer.phar install --dev --no-interaction; fi | ||
|
||
before_script: | ||
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "${_PHP}" == "hhvm" ]]; then curl -sSfL -o ~/.phpenv/versions/hhvm/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar; fi | ||
- mkdir -p build/logs | ||
|
||
script: | ||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./test-cake.sh --travis | grep Test; fi | ||
after_script: | ||
- if [[ ("${COLLECT_COVERAGE}" == "true") && ("${COVERITY_SCAN_BRANCH}" != 1) ]]; | ||
then travis_retry php app/vendor/bin/php-coveralls -v -r ./app/; fi | ||
after_success: | ||
- wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh | ||
- chmod +x send.sh | ||
- "./send.sh success $WEBHOOK_URL" | ||
- zip -r myphpcms.zip * | ||
- git tag --force "v${GIT_RELEASE_VERSION}.${TRAVIS_BUILD_NUMBER}" | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: UmXoq0sFQQixpMH12MG1Q3+pQhw05SuN919FgnKCru3X3RTCpXnZB8hgXvQHZn5Hhunq5eBPZ7C/bvk5wkzPXrwpAXyA7wj7PhGn6QbksU6xtkNOQVera/pMoTJW2VtNA2GcWvUvCnht3m73Tp2lguaI3Q6Yt8qq1vHJlDO5hbgvC0LdDrRFLIAA95jA9DWZRCWanHV5aepVNkX0qjQm25BIAwvQtfxkj/DipDYy2eIMh8brh6aZamE3cBv8sXP8b2b89GB670E35Otfseu58a6HxqmLD4dI5kIEzhSFjuelPJne0tmebFKww+mPn7v2SKJZR9xVfQM+mZHAp7SiozEvi1nqhUN31Z64mpDQDPnAB6eO36rGSdxDyYN7Ab24lJuLTcNkRbNOaJzn88q9d5DqGGQRJl6875cJmPFOjUwNteJIvLhDmPX3oHSPvWx3AtpEUtWeCrVt1yc7tyG0kdW8MmzoWvgDhbyvqAefKO3bEzVZeQQy/7LKy1i42+B/7N57oR6sgFX2N/zvdckFKjwHNiydds67Wj++EuJRXr2AhxdraW3iwDBTmkrZ3TjOsxcySbMBJHCOwHF9yAmLklbk4h1haCohkQrQxBp6Rhm3vKJGDOR3rOkjqIzqgHgo3pcXDdBULMpfB3/IbDeh3/RMuTEOXvv7FUNRjb4JIdI= | ||
file: myphpcms.zip | ||
on: | ||
repo: b23prodtm/myphpcms | ||
branch: feature/gh-releases |
Submodule TravisCI-OSX-PHP
added at
94c5f2
Oops, something went wrong.