Permalink
Browse files

T13578 setup phalcon environment (#13628)

* Moved tests to temp folder; Added initial boxfile with services

* Codeception bootstrap

* Escaper tests

* WIP - Modifying tests

* [#13578] - Updated docblocks, started work for Config

* [#13578] - Adjusted docblocks

* [#13578] - Added copyright notice; Refactored Config tests

* [#13578] - Refactored Debug/Dump tests

* [#13578] - Work on Messages

* [#13578] - Refactored Filter tests

* [#13578] - Moved back _ci folder

* [#13578] - Refactored Security tests

* [#13578] - PHPCS fixes

* [#13578] - Refactored validation messages

* [#13578] - PHPCS fixes

* [#13578] - Refactored Text tests

* [#13578] - WIP Tag test refactoring

* [#13578] - Refactored Tag

* [#13578] - Corrected tests; Added iconv in the boxfile

* [#13578] - Minor refactor in assets; Added Asset Filter tests

* [#13578] - Added necessary extensions in boxfile. Prepared some tests for refactoring; Work on image/assets

* [#13578] - PHPCS fixes

* [#13578] - Test corrections

* [#13578] - Assets refactoring; DiTrait to setup services; Refactoring on old tests

* [#13578] - Added fixtures in the autoloader

* [#13578] - Refactored Acl tests

* [#13578] - Test corrections

* [#13578] - Refactored Forms

* [#13578] - WIP - Http\Response Request

* [#13578] - Refactored Response tests

* [#13578] - Corrected Http tests; Refactored fixtures

* [#13578] - Enabled acpu extension; Refactored annotation tests

* [#13578] - PHPCS fixes

* [#13578] - Refactored Logger tests

* [#13578] - Refactored Flash tests

* [#13578] - Refactoring Loader tests

* [#13578] - Added zephir in composer for dev - will be reworked later on

* [#13578] - Moved old changelogs to the resources folder

* [#13578] - Changes to the boxfile to clean up folders

* [#13578] - Work on the dialects and fixtures; Refactored Version tests

* [#13578] - Refactored Text tests

* [#13578] - Added test stubs for every method and component of Phalcon; WIP to add relevant tests

* [#13578] - WIP: Message tests

* [#13578] - Added zephir dev as a requirement

* [#13578] - Minor correction to the test

* [#13578] - Refactored Messages\Message tests

* [#13578] - Refactored Messages tests

* [#13578] - Moved wip folder outside the test structure for the tests

* [#13578] - Work on the Tag tests; Refactored helpers for Tag

* [#13578] - PHPCS fixes and removed Exception test stubs

* [#13578] - Refactoring Tag tests

* [#13578] - Refactoring on Translation tests

* [#13578] - More tests added

* [#13578] - Added Image/factory; Removed Exception test stubs

* Removed unused variables

* WIP - Assets

* Refactoring asset inline js

* Moved a lot of tests from the wip/toCheck folders in the main folder. More work needed to refactor all of them

* Acl Role/Resource tests; Corrected names for constructor tests

* Added Registry tests

* Work on the dialect tests

* WIP - Db Dialect tests

* [#13578] - Work on skipped tests and extensionLoaded in the unit tester

* [#13578] - Renamed underscored files for PHPCS

* [#13578] - Rename of files with underscore in their names

* [#13578] - Renaming files; Work on Loader/Factory; Work on Cache

* [#13578] - Reformatting tests (cosmetic); Work on factory tests and backend cache

* [#13578] - Moved test stubs in unit

* [#13578] - Skipped a test (will check later)

* [#13578] - Initial structure for integration tests; Work on Assets

* [#13578] - Validation/Validator tests

* [#13578] - Renamed tests to give better output on console

* [#13578] - Test renaming for clarity; Work on validator tests

* [#13578] - Added descriptions for tests for better printout and information

* [#13578] - Added descriptions for Version tests

* [#13578] - Adding descriptions for tests

* [#13578] - Minor refactor of the validation tests

* [#13578] - Added comments and output for Text and Tag

* [#13578] - Added CLI suite and stubs

* [#13578] - Enabled unit helper in integration; Moved Db stubs in integration suite

* [#13578] - Work on Version

* [#13578] - Comments for all tests; Renamed tests according to namespaces; Added MemorySession for Codeception/Phalcon

* [#13578] - Corrected method names

* [#13578] - Corrected docblocks and messages

* [#13578] - Added more tests for __toString

* [#13578] - Added crypt trait to check for openssl

* [#13578] - Restored file I deleted by mistake

* [#13578] - Refactored Escaper tests

* [#13578] - Copyright notices

* [#13578] - Added db client libraries in the container

* [#13578] - Work on db tests; Added more packages to the boxfile

* [#13578] - Added more integration tests; moved fixtures around

* [#13578] - Events tests

* [#13578] - Added cache and di tests

* [#13578] - Added more tests from the toCheck

* [#13578] - Removed tests from deprecated projects

* [#13578] - Removed not needed files; Added pgsql import for nanobox; Added forms test

* [#13578] - More DB tests from "unit-tests"

* [#13578] - phpcs fixes and optimizations

* [#13578] - Added xcache in nanobox; Moved cache tests from unit-tests

* [#13578] - More tests moved (db from unit-tests)

* [#13578] - Moved dbdescribe tests from unit-tests

* [#13578] - Refactored Micro and Router tests; Reorganized assets

* [#13578] - Mvc Url and router tests

* [#13578] - Changed "boolean" to "bool" to ensure consistency

* [#13578] - Reorganized fixtures for views

* [#13578] - Work on the tests; skipped some to check later

* [#13578] - Added gitkeep to keep the cache folder there in the tests

* [#13578] - Fixed imports for the dbs for travis

* [#13578] - PHPCS fixes

* [#13578] - DbProfiler unit-test tests

* [#13578] - Work on models

* [#13578] - Added some debugging code

* [#13578] - Force disable travis cache for composer

* [#13578] - Removed zephir from composer; Started using the phar file in travis and nanobox

* [#13578] - Zephir version 11.6 in travis and boxfile

* [#13578] - Test correction

* [#13578] - Fixed test path

* [#13578] - More corrections to the test

* [#13578] - Added namespaces to models

* [#13578] - Work on the CI and db import scripts

* [#13578] - Corrections to the tests

* [#13578] - Added skips for this test

* [#13578] - Corrected models namespace

* [#13578] - Corrected some interfaces and implementations

* [#13578] - Removed php 7.0/7.1

* [#13578] - Beanstalk tests

* [#13578] - Fixing interfaces

* [#13578] - Removed APC, Memcache and XCache adapters (deprecated)

* [#13578] - Updated changelog

* [#13578] - Added di setup for view simple

* [#13578] - Fixing array access

* [#13578] - Simple view tests

* [#13578] - Fixed compilation errors

* [#13578] - Interface changes

* [#13578] - Trying compiling without the return type

* [#13578] - Interface corrections

* [#13578] - Fixing more interfaces

* [#13578] - Trying to use the NTS version

* [#13578] - Removed the lines I added before

* [#13578] - Fixed interfaces and compilation errors

* [#13578] - Changes to travis to reinstall php

* [#13578] - Triggering another build to install php again

* [#13578] - More interface changes

* [#13578] - Added dots....

* [#13578] - Interface corrections

* [#13578] - Removed unecessary tests

* [#13578] - More interface corrections

* [#13578] - One more correction to the interfaces

* [#13578] - More interface corrections

* [#13578] - Restored the folder I deleted by mistake (duh)

* [#13578] - Fixed interfaces for messages

* [#13578] - Corrected interface error

* [#13578] - Added missing class

* [#13578] - More interface corrections

* [#13578] - Corrected interface for the session test class

* [#13578] - Work on the environment variables and codeception

* [#13578] - Moved in the new suite the volt syntax tests; Adjustments to the travis for variables

* [#13578] - Fixing the environment for Travis

* [#13578] - Removed unecessary copy line

* [#13578] - Converted more Router tests

* [#13578] - Adjustment to Travis; Added more fixtures

* [#13578] - Work in volt compiler tests; reorganized delete strategy

* [#13578] - Skipping some tests to check travis

* [#13578] - Work on namespaces and env variables (again)

* [#13578] - Added boxfiles for 7.2/3, refacored the env and added env in integration tests

* [#13578] - Removed unwanted files; Refactoring of constants and env variables

* [#13578] - Added dispatcher tests

* [#13578] - Minor corrections

* [#13578] - Removing db from the bootstap

* [#13578] - Setup for CLI tasks

* [#13578] - Fixed environment file

* [#13578] - Work in models

* [#13578] - Db\Column tests; work on fixtures/models

* [#13578] - Fixing travis sqlite db

* [#13578] - Corrected setup db file

* [#13578] - Merge from 4.0; Zephir 11.8; Adjusted tests

* [#13578] - Added cache folder back

* [#13578] - Corrected tests

* [#13578] - Correcting interface

* [#13578] - Changed the cache backend "get" lifetime to only accept numbers

* [#13578] - Updated the changelog for the cache backend "get" lifetime

* [#13578] - Moved Micro test stubs in integration; Added micro collection test

* [#13578] - Corrected the interface

* [#13578] - Aligned cache interfaces

* [#13578] - Corrected controllers in micro collection

* [#13578] - Reverting changes to cache "get" interfaces

* [#13578] - Trying xenial for travis

* [#13578] - More interface corrections

* [#13578] - Added mysql service in travis

* [#13578] - Mysql 5.7 in travis

* [#13578] - Corrections to tests and php settings

* [#13578] - Corrected Volt test; Disabled run for integration for now

* [#13578] - Minor adjustment to the annotations tests

* [#13578] - Change to the reader cest for annotations

* [#13578] - More debug output

* [#13578] - Changes to the environment variables

* [#13578] - Marking some tests skipped to check them later

* [#13578] - Moved Forms tests in integration; Refactored all the old "unit-test" tests

* [#13578] - Moved pagination tests to the integration suite

* [#13578] - Code quality cleanup

* [#13578] - Moved Validation to integration suite; Added paginator tests

* [#13578] - Refactored a lot of MVC tests

* [#13578] - Refactored Session tests

* [#13578] - Corrections to Tag tests; Reenabled CLI tasks

* [#13578] - Final refactoring (I hope) and removing unused files

* [#13578] - Updates to the readme and changelog

* [#13578] - Corrections based on review

* [#13578] - Updated nanobox setup files

* [#13578] - Changes based on review

* [#13578] - Added boxfile to the .gitignore

* [#13578] - Added more instructions in the tests/README

* [#13578] - Updated README; Adjusted tests after the merge

* [#13578] - Corrected schema file for Postgresql

* [#13578] - Minor correction; Zephir 0.11.8

* [#13578] - Triggering the build

* [#13578] - Correction to the case statement

* [#13578] - Corrected something in the file - cannot see what character was throwing the scanner off

* [#13578] - Check env variables

* [#13578] - Work on the db environment for travis

* [#13578] - Refactored tests to use dataProviders

* [#13578] - Added again the travis environment variables
  • Loading branch information...
niden committed Dec 5, 2018
1 parent c0af848 commit cc36024216ede529eefb222d910abfdfe68004dd
Showing 5,410 changed files with 224,216 additions and 99,826 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -48,7 +48,9 @@ autom4te.cache/
/vendor
/ide/

boxfile.yml
composer.lock
php_test_results_*.txt
docker-compose.yml
build/gccarch
tests/_cache
@@ -5,16 +5,15 @@ php:
- 'master'
- '7.3'
- '7.2'
- '7.1'
- '7.0'

git:
depth: 1

branches:
only:
- master
- /^(4|5)\.\d+\.(\d+|x)$/
# TODO - Remove this when we go deploy this
#branches:
# only:
# - master
# - /^(4|5)\.\d+\.(\d+|x)$/

addons:
apt:
@@ -26,6 +25,7 @@ addons:
- lcov
- mysql-server
- mysql-client
postgresql: "9.4"

matrix:
fast_finish: true
@@ -42,6 +42,7 @@ cache:
- ${HOME}/.local/opt

services:
- mysql
- beanstalkd
- mongodb
- redis-server
@@ -50,7 +51,7 @@ services:
env:
global:
- CC="gcc"
- ZEPHIR_VERSION="0.10.14"
- ZEPHIR_VERSION="0.11.8"
- RE2C_VERSION="1.1.1"
- REPORT_EXIT_STATUS=1
- REPORT_COVERAGE=1
@@ -68,6 +69,8 @@ before_install:
- tests/_ci/setup-dbs.sh
- source tests/_ci/environment
- export $(cut -d= -f1 tests/_ci/environment)
- wget --no-clobber -O $HOME/bin/zephir https://github.com/phalcon/zephir/releases/download/${ZEPHIR_VERSION}/zephir.phar
- chmod +x $HOME/bin/zephir

install:
- tests/_ci/install-prereqs.sh
@@ -84,9 +87,10 @@ script:
- vendor/bin/phpcs
- vendor/bin/codecept build
# TODO: Add `cli' suite and refactor current cli-tests
# - vendor/bin/codecept run -v
- vendor/bin/codecept run -v -n tests/cli/
- vendor/bin/codecept run -v -n tests/integration/
- vendor/bin/codecept run -v -n tests/unit/
# TODO: Refactor legacy unit tests from the "unit-tests" directory
- phpenv config-rm xdebug.ini || true
- tests/_ci/volt-tests.sh

@@ -19,6 +19,7 @@
- Added `Phalcon\Mvc\Model\Query\BuilderInterface::offset` [#13599](https://github.com/phalcon/cphalcon/pull/13599)
- Added `Phalcon\Http\Response\Cookies::getCookies` [#13591](https://github.com/phalcon/cphalcon/pull/13591)
- Added `Phalcon\Mvc\Model::isRelationshipLoaded` to check if relationship is loaded
- Added an easy way to work with Phalcon and run the tests locally, using [nanobox.io](https://nanobox.io) [#13578](https://github.com/phalcon/cphalcon/issues/13578)

## Changed
- By configuring `prefix` and `statsKey` the `Phalcon\Cache\Backend\Redis::queryKeys` no longer returns prefixed keys, now it returns original keys without prefix. [PR-13456](https://github.com/phalcon/cphalcon/pull/13456)
@@ -41,6 +42,7 @@
- Changed `Phalcon\Tag::getTitle()`. It returns only the text. It accepts `prepend`, `append` booleans to prepend or append the relevant text to the title. [#13547](https://github.com/phalcon/cphalcon/issues/13547)
- Changed `Phalcon\Di\Service` constructor to no longer takes the name of the service.
- Changed `Phalon\Tag::textArea` to use `htmlspecialchars` to prevent XSS injection. [#12428](https://github.com/phalcon/cphalcon/issues/12428)
- Changed `Phalon\Cache\Backend\*::get` to use only positive numbers for `lifetime`

## Removed
- PHP < 7.0 no longer supported
@@ -57,4 +59,12 @@
- Removed `Phalcon\Validation\MessageInterface` and `Phalcon\Mvc\Model\MessageInterface` in favor of `Phalcon\Messages\MessageInterface`
- Removed `Phalcon\Validation\Message` and `Phalcon\Mvc\Model\Message` in favor of `Phalcon\Messages\Message`
- Removed `Phalcon\Validation\Message\Group` in favor of `Phalcon\Messages\Messages`
- Removed deprecated `Phalcon\Annotations\Adapter\Apc`
- Removed deprecated `Phalcon\Annotations\Adapter\Xcache`
- Removed deprecated `Phalcon\Cache\Backend\Apc`
- Removed deprecated `Phalcon\Cache\Backend\Memcache`
- Removed deprecated `Phalcon\Cache\Backend\Xcache`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Apc`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Memcache`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Xcache`

@@ -7,10 +7,10 @@ To see what we changed in particular framework branch refer to the relevant chan
## Index

- [**`4.0.x`**](CHANGELOG-4.0.md)
- [**`3.4.x`**](CHANGELOG-3.4.md)
- [**`3.3.x`**](CHANGELOG-3.3.md)
- [**`3.2.x`**](CHANGELOG-3.2.md)
- [**`3.1.x`**](CHANGELOG-3.1.md)
- [**`3.0.x`**](CHANGELOG-3.0.md)
- [**`2.0.x`**](CHANGELOG-2.0.md)
- [**`1.x.x`**](CHANGELOG-1.x.md)
- [**`3.4.x`**](resources/CHANGELOG-3.4.md)
- [**`3.3.x`**](resources/CHANGELOG-3.3.md)
- [**`3.2.x`**](resources/CHANGELOG-3.2.md)
- [**`3.1.x`**](resources/CHANGELOG-3.1.md)
- [**`3.0.x`**](resources/CHANGELOG-3.0.md)
- [**`2.0.x`**](resources/CHANGELOG-2.0.md)
- [**`1.x.x`**](resources/CHANGELOG-1.x.md)
@@ -1,5 +1,4 @@
# can be changed while bootstrapping project
actor: Tester
actor_suffix: Tester

paths:
# where the modules stored
@@ -23,7 +22,7 @@ settings:

coverage:
# Disable Code Coverage by default to speed up Travis tests
enabled: false
enabled: false

extensions:
enabled:
@@ -41,13 +41,12 @@
"ext-psr": "*",
"ext-xml": "*",
"codeception/codeception": "^2.4",
"codeception/specify": "1.0.*",
"codeception/verify": "1.0.*",
"mustache/mustache": "^2.11",
"phpunit/phpunit": "^6.4",
"predis/predis": "^1.1",
"squizlabs/php_codesniffer": "^3.2",
"twig/twig": "~1.35"
"twig/twig": "~1.35",
"vlucas/phpdotenv": "^2.5"
},
"config": {
"optimize-autoloader": true,
@@ -59,6 +58,7 @@
"Zephir\\Optimizers\\": "optimizers/",
"Phalcon\\Test\\Unit\\": "tests/unit/",
"Phalcon\\Test\\Integration\\": "tests/integration/",
"Phalcon\\Test\\Fixtures\\": "tests/_data/fixtures/",
"Phalcon\\Test\\Module\\": "tests/_support/Module/",
"Phalcon\\Test\\Listener\\": "tests/_data/listener/",
"Phalcon\\Test\\Db\\": "tests/_data/db/"
@@ -49,19 +49,22 @@ abstract class Adapter implements AdapterInterface, EventsAwareInterface

/**
* Role which the list is checking if it's allowed to certain resource/access
* @var mixed
*
* @var string
*/
protected _activeRole { get };

/**
* Resource which the list is checking if some role can access it
* @var mixed
*
* @var string
*/
protected _activeResource { get };

/**
* Active access which the list is checking if some role can access it
* @var mixed
*
* @var string
*/
protected _activeAccess { get };

@@ -188,7 +188,7 @@ class Memory extends Adapter
* @param array|string accessInherits
* @param RoleInterface|string|array role
*/
public function addRole(role, accessInherits = null) -> boolean
public function addRole(role, accessInherits = null) -> bool
{
var roleName, roleObject;

@@ -229,7 +229,7 @@ class Memory extends Adapter
* @param array|string accessInherits
* @param RoleInterface|string|array role
*/
public function addInherit(string roleName, var roleToInherits) -> boolean
public function addInherit(string roleName, var roleToInherits) -> bool
{
var roleInheritName, rolesNames, roleToInherit, checkRoleToInherit,
checkRoleToInherits, usedRoleToInherits, roleToInheritList, usedRoleToInherit;
@@ -313,15 +313,15 @@ class Memory extends Adapter
/**
* Check whether role exist in the roles list
*/
public function isRole(string roleName) -> boolean
public function isRole(string roleName) -> bool
{
return isset this->_rolesNames[roleName];
}

/**
* Check whether resource exist in the resources list
*/
public function isResource(string resourceName) -> boolean
public function isResource(string resourceName) -> bool
{
return isset this->_resourcesNames[resourceName];
}
@@ -363,7 +363,7 @@ class Memory extends Adapter
* @param Phalcon\Acl\Resource|string resourceValue
* @param array|string accessList
*/
public function addResource(var resourceValue, var accessList) -> boolean
public function addResource(var resourceValue, var accessList) -> bool
{
var resourceName, resourceObject;

@@ -388,7 +388,7 @@ class Memory extends Adapter
*
* @param array|string accessList
*/
public function addResourceAccess(string resourceName, var accessList) -> boolean
public function addResourceAccess(string resourceName, var accessList) -> bool
{
var accessName, accessKey, exists;

@@ -581,7 +581,7 @@ class Memory extends Adapter
* @param RoleInterface|RoleAware|string roleName
* @param ResourceInterface|ResourceAware|string resourceName
*/
public function isAllowed(var roleName, var resourceName, string access, array parameters = null) -> boolean
public function isAllowed(var roleName, var resourceName, string access, array parameters = null) -> bool
{
var eventsManager, accessList, accessKey,
haveAccess = null, rolesNames,
@@ -750,7 +750,7 @@ class Memory extends Adapter
/**
* Check whether a role is allowed to access an action from a resource
*/
protected function _isAllowed(string roleName, string resourceName, string access) -> string | boolean
protected function _isAllowed(string roleName, string resourceName, string access) -> string | bool
{
var accessList, accessKey,checkRoleToInherit, checkRoleToInherits, usedRoleToInherits, usedRoleToInherit;

@@ -52,30 +52,30 @@ interface AdapterInterface
/**
* Adds a role to the ACL list. Second parameter lets to inherit access data from other existing role
*/
public function addRole(role, accessInherits = null) -> boolean;
public function addRole(role, accessInherits = null) -> bool;

/**
* Do a role inherit from another existing role
*/
public function addInherit(string roleName, roleToInherit) -> boolean;
public function addInherit(string roleName, roleToInherit) -> bool;

/**
* Check whether role exist in the roles list
*/
public function isRole(string roleName) -> boolean;
public function isRole(string roleName) -> bool;

/**
* Check whether resource exist in the resources list
*/
public function isResource(string resourceName) -> boolean;
public function isResource(string resourceName) -> bool;

/**
* Adds a resource to the ACL list
*
* Access names can be a particular action, by example
* search, update, delete, etc or a list of them
*/
public function addResource(resourceObject, accessList) -> boolean;
public function addResource(resourceObject, accessList) -> bool;

/**
* Adds access to resources
@@ -100,7 +100,7 @@ interface AdapterInterface
/**
* Check whether a role is allowed to access an action from a resource
*/
public function isAllowed(roleName, resourceName, access, array parameters = null) -> boolean;
public function isAllowed(roleName, resourceName, string access, array parameters = null) -> bool;

/**
* Returns the role which the list is checking if it's allowed to certain resource/access

This file was deleted.

Oops, something went wrong.
@@ -62,7 +62,7 @@ class Apcu extends Adapter
/**
* Reads parsed annotations from APCu
*/
public function read(string! key) -> <Reflection> | boolean
public function read(string! key) -> <Reflection> | bool
{
return apcu_fetch(strtolower("_PHAN" . this->_prefix . key));
}
Oops, something went wrong.

0 comments on commit cc36024

Please sign in to comment.