New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T13578 setup phalcon environment #13628

Merged
merged 231 commits into from Dec 5, 2018

Conversation

Projects
3 participants
@niden
Copy link
Member

niden commented Dec 4, 2018

Hello!

  • Type: new feature - code quality
  • Link to issue: #13578

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Container base environment for running tests locally.

Thanks

niden added some commits Nov 3, 2018

[#13578] - Added necessary extensions in boxfile. Prepared some tests…
… for refactoring; Work on image/assets
Merge branch '4.0.x' into T13578-setup-phalcon-environment
* 4.0.x: (33 commits)
  Updated stale to not close issues labelled as bugs
  Use latest Zephir Parser
  [#11608] - Removed unused variables
  [#11608] - Reverting instantiation of the client
  [#11608] - Removed '_' from variables and methods
  [#11608] - Refactoring on the connect to check if the object is already initialized/connected
  [#11608] - Refactoring of the getClient()
  [#11608] - Fixed tabs
  [#11608] - Corrections based on review
  [#10532] - Corrected variable
  [#10532] - Updated changelog
  [#10532] - Added case insensitive column map in model
  [#11608] - Corrected variable name
  [#11608] - Corrected costructor and changelog
  [#11608] - Updated the changelog
  [#11608] - Corrected tests
  [#11608] - Fixed typos
  [#11608] - More corrections
  [#11608] - Modifications to the class; Adjusted tests
  [#11608] - Changed the comparison for the key on save
  ...

@niden niden added this to the 4.0.0 milestone Dec 4, 2018

@niden niden requested a review from sergeyklay Dec 4, 2018

@niden niden added this to In progress in 4.0 Release via automation Dec 4, 2018

@niden

This comment has been minimized.

Copy link
Member

niden commented Dec 4, 2018

@sergeyklay
Copy link
Member

sergeyklay left a comment

I paused at phalcon/db/adapter/pdo/postgresql.zep. I will continue a bit later

- 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`

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member
Suggested change Beta
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Xcache`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Xcache`

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed

- 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`

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member
Suggested change Beta
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Memcache`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Memcache`

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed

- 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`

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member
Suggested change Beta
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Apc`
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Apc`

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed

- Removed deprecated `Phalcon\Annotations/Adapter/Xcache`
- Removed deprecated `Phalcon\Cache/Backend/Apc`
- Removed deprecated `Phalcon\Cache/Backend/Memcache`
- Removed deprecated `Phalcon\Cache/Backend/Xcache`

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member
Suggested change Beta
- Removed deprecated `Phalcon\Cache/Backend/Xcache`
- Removed deprecated `Phalcon\Cache\Backend\Xcache`

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed

- Removed deprecated `Phalcon\Annotations/Adapter/Apc`
- Removed deprecated `Phalcon\Annotations/Adapter/Xcache`
- Removed deprecated `Phalcon\Cache/Backend/Apc`
- Removed deprecated `Phalcon\Cache/Backend/Memcache`

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member
Suggested change Beta
- Removed deprecated `Phalcon\Cache/Backend/Memcache`
- Removed deprecated `Phalcon\Cache\Backend\Memcache`

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed

{
var prefixedKey, cachedContent;

if lifetime < 1 {
throw new Exception("The lifetime must be at least 1 second");
}

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member

It is strange because this method does not use lifetime at all

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Yeah this needs to be removed, and it will once we refactor the cache

@@ -45,7 +45,7 @@ class Factory extends BaseFactory
/**
* @param \Phalcon\Config|array config
*/
public static function load(var config) -> <BackendInterface>
public static function load(var config) -> object

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member

See my comment above

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

This one I don't think we can change it to the BackendInterface because it inherits from FactoryInterface which is used for other factory classes (say Config, Paginator etc.) If this is not object then we have interface problems in compilation

@@ -80,8 +80,8 @@ class File extends Backend
}

if fetch safekey, options["safekey"] {
if typeof safekey !== "boolean" {
throw new Exception("safekey option should be a boolean.");
if typeof safekey !== "bool" {

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member

Are you sure that typeof returns exactly "bool" not "boolean"?

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Fixed the bool/boolean

if typeof safekey !== "boolean" {
throw new Exception("safekey option should be a boolean.");
if typeof safekey !== "bool" {
throw new Exception("safekey option should be a bool.");

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member

IMO, we can safely use full type name in the human readable messages, eg bool -> boolean.

@@ -100,7 +100,7 @@ class File extends Backend
/**
* Returns a cached content
*/
public function get(string keyName, var lifetime = null) -> var | null
public function get(string keyName, var lifetime = 1) -> var | null

This comment has been minimized.

@sergeyklay

sergeyklay Dec 4, 2018

Member

In fact I can't realize why

This comment has been minimized.

@niden

niden Dec 4, 2018

Member

Typo that I missed. I was trying to correct the interface so changed the lifetime to int but that did not work in the end. This has been corrected.

niden added some commits Dec 4, 2018

niden added some commits Dec 4, 2018

@niden niden merged commit cc36024 into phalcon:4.0.x Dec 5, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

4.0 Release automation moved this from In progress to Done Dec 5, 2018

@danhunsaker
Copy link
Member

danhunsaker left a comment

Couple of minor tweaks?


The testing suite can be run on your own machine. The main dependency is [Codeception][1] which can be installed using [Composer][6]:
The testing suite can be run on your own machine. The only dependencies for running the testing suite or even developing on Phalcon is [nanobox][9]`. Installation instructions for nanobox can be found [here][10]. Also, the main dependency is [Codeception][1] which can be installed using [Composer][6]:

This comment has been minimized.

@danhunsaker

danhunsaker Dec 5, 2018

Member

This is phrased a bit awkwardly... Maybe .... The only dependencies for running the testing suite are [nanobox][9] and [Codeception][1]. Nanobox can also be used for developing Phalcon, and its installation instructions can be found [in the Nanobox documentation][10]. Codeception can be installed using [Composer][6]: or something similar? (also, the [nanobox][9] here isn't rendering as a link...)

@@ -196,3 +214,5 @@ Phalcon Framework Team<br>2017
[6]: http://getcomposer.org
[7]: https://github.com/phalcon/cphalcon/tree/master/tests/_proxies
[8]: https://wiki.archlinux.org/index.php/Environment_variables
[8]: https://nanobox.io/

This comment has been minimized.

@danhunsaker

danhunsaker Dec 5, 2018

Member

I suspect this link isn't working because it's supposed to be a [9], here?

```sh
# run this command from project root
/app $ composer install --dev --prefer-source
```

This comment has been minimized.

@danhunsaker

danhunsaker Dec 5, 2018

Member

This is done automatically via nanobox build, which the first nanobox run will always call...

```bash
/app $ wget --no-clobber -O /opt/gonano/bin/zephir https://github.com/phalcon/zephir/releases/download/0.11.7/zephir.phar
/app $ chmod +x /opt/gonano/bin/zephir
```

This comment has been minimized.

@danhunsaker

danhunsaker Dec 5, 2018

Member

These steps are already in the boxfile...

@niden niden deleted the niden:T13578-setup-phalcon-environment branch Dec 5, 2018

@niden niden referenced this pull request Dec 11, 2018

Closed

Refactor unit-tests #13028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment