Code Monkey home page Code Monkey logo

core's Introduction

core's People

Contributors

adrianmalik avatar archdevil666pl avatar arius86 avatar maniolek avatar sergeyklay avatar szytko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Add CRUD functions instead of using EventsManager

Please add crud function like:

public function afterSave($record) {}
public function afterCreate($record) {}

for CRUD controller because using:
$this->dispatcher->getEventsManager()->attach(Events::AFTER_SAVE, function(){
$this->redirect();
});
can be annoying

Thanks

new year \Vegas\Util\DateTime tests failing

$this->assertFalse(\Vegas\Util\DateTime::isValid((new \DateTime())->format('d/m/Y')));

It works for 31/12/2014 (and so) but now with 2/1/2015 DateTime has some problems (same in testShouldResolveDateTime test).

Add Phinx wrapper as a CLI task

Some of Vegas libraries need database table generation for applications using MySQL connection. Preferably, tables should be created using Phinx.

Still, it needs a few tweaks instead of using raw Phinx executable:

  • connection settings should be read from Vegas application config instead of using phinx.yml file
  • migrations should be kept in a unified (the same for each Vegas library) directory path - let's assume it briefly in: tests/fixtures/migrations

Undefined variable: record

Whoops\Exception\ErrorException: Undefined variable: record in file /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_edit.volt.php on line 17
Stack trace:

  1. Whoops\Exception\ErrorException->() /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_edit.volt.php:17
  2. Whoops\Run->handleError() /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_edit.volt.php:17
  3. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  4. Vegas\Mvc\View->_engineRender() [internal]:0
  5. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  6. Vegas\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/Controller/CrudAbstract.php:52
  7. Vegas\Mvc\Controller\CrudAbstract->Vegas\Mvc\Controller{closure}() [internal]:0
  8. Phalcon\Events\Manager->fireQueue() [internal]:0
  9. Phalcon\Events\Manager->fire() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:210
  10. Vegas\Mvc\View->_engineRender() [internal]:0
  11. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  12. Vegas\Mvc\View->render() [internal]:0
  13. Phalcon\Mvc\View->getRender() /opt/vendor/vegas-cmf/forms/src/Decorator.php:115
  14. Vegas\Forms\Decorator->generatePartial() /opt/vendor/vegas-cmf/forms/src/Decorator.php:70
  15. Vegas\Forms\Decorator->render() /opt/vendor/vegas-cmf/forms/src/Decorator/DecoratedTrait.php:58
  16. Vegas\Forms\Element\Cloneable->baseRenderDecorated() /opt/vendor/vegas-cmf/forms/src/Element/Cloneable.php:146
  17. Vegas\Forms\Element\Cloneable->renderDecorated() /opt/cache/_opt_app_modules_product_views_admin_product_partial__render_elements.volt.php:93
  18. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  19. Vegas\Mvc\View->_engineRender() [internal]:0
  20. Phalcon\Mvc\View->partial() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:412
  21. Vegas\Mvc\View->partial() [internal]:0
  22. Phalcon\Mvc\View\Engine->partial() /opt/cache/_opt_app_modules_product_views_admin_product__form.volt.php:27
  23. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  24. Vegas\Mvc\View->_engineRender() [internal]:0
  25. Phalcon\Mvc\View->partial() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:412
  26. Vegas\Mvc\View->partial() [internal]:0
  27. Phalcon\Mvc\View\Engine->partial() /opt/cache/_opt_app_modules_product_views_admin_product_edit.volt.php:5
  28. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  29. Vegas\Mvc\View->_engineRender() [internal]:0
  30. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  31. Vegas\Mvc\View->render() [internal]:0
  32. Phalcon\Mvc\Application->handle() /opt/vendor/vegas-cmf/core/src/Mvc/Bootstrap.php:162
  33. Vegas\Mvc\Bootstrap->run() /opt/public/index.php:26

Whoops\Exception\ErrorException: Undefined variable: form in file /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_new.volt.php on line 18
Stack trace:

  1. Whoops\Exception\ErrorException->() /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_new.volt.php:18
  2. Whoops\Run->handleError() /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_new.volt.php:18
  3. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  4. Vegas\Mvc\View->_engineRender() [internal]:0
  5. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  6. Vegas\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/Controller/CrudAbstract.php:52
  7. Vegas\Mvc\Controller\CrudAbstract->Vegas\Mvc\Controller{closure}() [internal]:0
  8. Phalcon\Events\Manager->fireQueue() [internal]:0
  9. Phalcon\Events\Manager->fire() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:210
  10. Vegas\Mvc\View->_engineRender() [internal]:0
  11. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  12. Vegas\Mvc\View->render() [internal]:0
  13. Phalcon\Mvc\View->getRender() /opt/vendor/vegas-cmf/forms/src/Decorator.php:115
  14. Vegas\Forms\Decorator->generatePartial() /opt/vendor/vegas-cmf/forms/src/Decorator.php:70
  15. Vegas\Forms\Decorator->render() /opt/vendor/vegas-cmf/forms/src/Decorator/DecoratedTrait.php:58
  16. Vegas\Forms\Element\Cloneable->baseRenderDecorated() /opt/vendor/vegas-cmf/forms/src/Element/Cloneable.php:146
  17. Vegas\Forms\Element\Cloneable->renderDecorated() /opt/cache/_opt_vendor_vegas-cmf_core_src_mvc_controller_crud_views_new.volt.php:33
  18. Phalcon\Mvc\View\Engine\Volt->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:188
  19. Vegas\Mvc\View->_engineRender() [internal]:0
  20. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  21. Vegas\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/Controller/CrudAbstract.php:52
  22. Vegas\Mvc\Controller\CrudAbstract->Vegas\Mvc\Controller{closure}() [internal]:0
  23. Phalcon\Events\Manager->fireQueue() [internal]:0
  24. Phalcon\Events\Manager->fire() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:210
  25. Vegas\Mvc\View->_engineRender() [internal]:0
  26. Phalcon\Mvc\View->render() /opt/vendor/vegas-cmf/core/src/Mvc/View.php:394
  27. Vegas\Mvc\View->render() [internal]:0
  28. Phalcon\Mvc\Application->handle() /opt/vendor/vegas-cmf/core/src/Mvc/Bootstrap.php:162
  29. Vegas\Mvc\Bootstrap->run() /opt/public/index.php:26

mongodb how to enable

Hi
how to enable mongodb, since also mysql table is missing, which is mongodb required steps?

Thanks

Paginator, Mongo error

When there is a lot of records in collection and we use default Vegas paginator and Data limiter
on page >~450 we get error like this:

localhost:27017: Runner error: Overflow sort stage buffered data usage of 33557981 bytes exceeds internal limit of 33554432 bytes#0 /home/www/vegas/talentnetwork/vendor/vegas-cmf/core/src/Paginator/Adapter/Mongo.php(38): MongoCursor->rewind() #1 /home/www/vegas/talentnetwork/vendor/vegas-cmf/core/src/Paginator/Adapter/MongoAbstract.php(175): Vegas\Paginator\Adapter\Mongo->getResults() #2 /home/www/vegas/talentnetwork/vendor/vegas-cmf/data-limiter/src/DataLimiter/Paginator.php(146): Vegas\Paginator\Adapter\MongoAbstract->getPaginate() #3 /home/www/vegas/talentnetwork/app/modules/Vacancy/controllers/frontend/VacancyController.php(52): Vegas\DataLimiter\Paginator->getPaginate() #4 [internal function]: Vacancy\Controllers\Frontend\VacancyController->indexAction(false) #5 [internal function]: Phalcon\Dispatcher->dispatch() #6 /home/www/vegas/talentnetwork/vendor/vegas-cmf/core/src/Mvc/Bootstrap.php(162): Phalcon\Mvc\Application->handle(NULL) #7 /home/www/vegas/talentnetwork/public/index.php(15): Vegas\Mvc\Bootstrap->run() #8 {main} 

The solution for it is setting index on 'created_at' in Mongo:

db.collection.createIndex({created_at: -1})

Great project (general info)

Hi

First of all congrats for this awesome project. It's exactly what I was looking for.

I have a questions about support with future release of phalcon 2.0

Can I code with current version and easy upgrade in future to phalcon 2.0?

Do you think re-code this libs in Zephir?

Thanks

Assets service

On the view I do for ex.
{% do assets.collection('js').addJs('js/main.js') %}
the addJs function comes from \Phalcon\Assets\Collection instead of The Vegas\Assets\Manager, so preventing from duplication is not working

Task for generating services/modules config files

When using production environment following files are not being updated by default:

  • app/config/modules.php
  • app/config/services.php

A workaround requires to switch to development environment and regenerate this file by calling the app either via browser or CLI.
There should be a CLI task which does it without having to call the application.

support for phalcon 2.x

hi guys, Would be grat to move vegas to XXI century :)

I found some issues which not allow to run vegas (core) on phalcon 2.x env. After simple code refactor I got working vegas on newest phalcon without any errors.

1

  • ErrorException: Argument 1 passed to Phalcon\Config::merge() must be an instance of Phalcon\Config, array given, called in /vendor/vegas-cmf/core/src/Mvc/Bootstrap.php on line 142 and defined
    /vendor/vegas-cmf/core/src/Bootstrap/ModulesInitializerTrait.php (57)

solution:

/vendor/vegas-cmf/core/src/Bootstrap/ModulesInitializerTrait.php:57

$config->merge(new Config($moduleConfig));

2

  • [:error] [pid 28696] [client 127.0.0.1:54134] PHP Strict Standards: Declaration of Vegas\Mvc\Application::registerModules() should be compatible with Phalcon\Mvc\Application::registerModules(array $modules, $merge = NULL) in /vendor/vegas-cmf/core/src/Mvc/Application.php on line 0

solution:

/vendor/vegas-cmf/core/src/Mvc/Application.php:41

public function registerModules(array $modules, $merge = null)

3

  • [:error] [pid 28696] [client 127.0.0.1:54134] PHP Fatal error: Declaration of Vegas\DI\InjectionAwareTrait::setDI($dependencyInjector) must be compatible with Phalcon\Di\InjectionAwareInterface::setDI(Phalcon\DiInterface $dependencyInjector) in /vendor/vegas-cmf/core/src/Mvc/Router.php on line 265

solution:

/vendor/vegas-cmf/core/src/DI/InjectionAwareTrait.php:38

public function setDI(DiInterface $dependencyInjector)

4

  • [:error] [pid 28690] [client 127.0.0.1:54150] PHP Fatal error: Declaration of Vegas\Mvc\ModuleAbstract::registerAutoloaders() must be compatible with Phalcon\Mvc\ModuleDefinitionInterface::registerAutoloaders(Phalcon\DiInterface $dependencyInjector = NULL) in /vendor/vegas-cmf/core/src/Mvc/ModuleAbstract.php on line 23

solution:

/vendor/vegas-cmf/core/src/Mvc/ModuleAbstract.php:42

public function registerAutoloaders(DiInterface $dependencyInjector = null)

5

  • [:error] [pid 28688] [client 127.0.0.1:54154] PHP Fatal error: Declaration of Vegas\Mvc\ModuleAbstract::registerServices() must be compatible with Phalcon\Mvc\ModuleDefinitionInterface::registerServices(Phalcon\DiInterface $dependencyInjector) in /vendor/vegas-cmf/core/src/Mvc/ModuleAbstract.php on line 24

solution:

/vendor/vegas-cmf/core/src/Mvc/ModuleAbstract.php:78

public function registerServices(DiInterface $di)

6

  • ErrorException: Declaration of Vegas\Mvc\View::_engineRender() should be compatible with Phalcon\Mvc\View::_engineRender($engines, $viewPath, $silence, $mustClean, Phalcon\Cache\BackendInterface $cache = NULL)
    /vendor/vegas-cmf/core/src/Mvc/View.php (0)

solution:

/vendor/vegas-cmf/core/src/Mvc/View.php:99

protected function _engineRender($engines, $viewPath, $silence, $mustClean, BackendInterface $cache = null)

Its core issues only, but rest of modules is going over the hill.
Bon Appetit! :)

Support for theme views

Hi

I would like to ask for a new feature.

Currently is not possible override view file when create a new theme.

Will be great to have similar to wp child themes.

This allow you override certain view file, without changing core file.

For example: you put view file into a folder views/default/*

Then someone can create a new theme views/my_theme/* and override the files which want.

The system check if exist the file on my_theme otherwise load default.

Thanks!

Please add the following code to the Vegas\DI\Scaffolding

Please add the following code to the: Vegas\DI\Scaffolding to make new upload working

protected $model;
....
public function getModel()
{
    if (empty($this->model)) {
        $this->model = new $this->modelName();
    }
    return $this->model;
}

Controller scopes

Please add into documentation note that controller scope is mandatory and controllers always should reside under some subfolder inside 'controllers' folder.
E.g.:

controllers/SessionController.php - bad
controllers/frontend/SessionController.php - good

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.