Giter VIP home page Giter VIP logo

yii-cycle's People

Contributors

arogachev avatar babl86 avatar dagpro avatar dependabot-preview[bot] avatar dependabot[bot] avatar fantom409 avatar kutuzovska avatar luizcmarin avatar mapeveri avatar msmakouz avatar robregonm avatar roxblnfk avatar rustamwin avatar samdark avatar soodssr avatar stylecibot avatar terabytesoftw avatar thenotsoft avatar viktorprogger avatar vjik avatar vladis84 avatar xepozz avatar yiiliveext 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii-cycle's Issues

Add EntityWriter

I'm thinking about adding the EntityWriter class.

Do you think this will be useful?
Should there be a separate interface for this? (EntityWriterInterface implements DataWriterinterface)

Getting repository from container

In order to be able to get the repository from the container, we need to create a factory for each repository.

We need to explore the possibility of implementing automatic declaration of repositories in the container or creating a basic repository for autowiring

Auto cleaning cached schema after migration

After a migration up/down action, the AfterMigrate event is dispatched.
Depending on how the schema is stored, the cache needs to be cleared (or schema file to be rebuilded)

Schema to Registry converter

We need to create generator that will convert a schema object (\Cycle\ORM\SchemaInterface) into a \Cycle\Schema\Registry object
Then we will be able to generate migrations based on a ready-made scheme or use other generators

Make FromFileSchemaProvider writeable

We need to redesign the single file schema provider (FromFileSchemaProvider) so that it can not only read the schema from the file, but also write it to the file in readable format like result of the cycle/schema/php command

  • mark FromFileSchemaProvider to deprecated in favor of FromFilesSchemaProvider
  • update documentation
  • refactor the SchemaToPHP helper and integrate it with the FromFileSchemaProvider
  • rename FromFileSchemaProvider to PhpFileSchemaProvider

Add MergeSchemaProvider provider

We have a SchemaProviderPipeline class for sequential schema reading from providers.
We need to add a provider that will read parts of the schema from several providers in parallel and merge them into a single schema.
This way, we can connect schemas from different sources using existing providers: for example, annotations in the application and files in vendor packages.

PHP Fatal Error: Class Yiisoft\Yii\Cycle\Data\Reader\FilterHandler\AllHandler contains 1 abstract method & must therefore be declared abstract

Class Yiisoft\Yii\Cycle\Data\Reader\FilterHandler\AllHandler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Yiisoft\Data\Reader\FilterHandlerInterface::getFilterClass)

image

What steps will reproduce the problem? Upgrading to request-provider and introducing filters on grids

What is the expected result? Basic Functionality

What do you get instead? The whole system cannot move forward.

Additional info

Q A
Version 1.0.?
PHP version 8.2
Operating system Windows 11

This error does not appear if I do not update composer.

Steps taken to try and avoid this error:

config\web\di\middleware-dispatcher 

<?php

declare(strict_types=1);

/**
 * @var array $params
 */
use Yiisoft\Definitions\Reference;
use Yiisoft\Input\Http\HydratorAttributeParametersResolver;
//use Yiisoft\Input\Http\Request\Catcher\RequestCatcherParametersResolver;
use Yiisoft\Middleware\Dispatcher\CompositeParametersResolver;
use Yiisoft\Middleware\Dispatcher\ParametersResolverInterface;

return [
    ParametersResolverInterface::class => [
        'class' => CompositeParametersResolver::class,
        '__construct()' => [
            Reference::to(HydratorAttributeParametersResolver::class),
            //Reference::to(RequestCatcherParametersResolver::class),
        ],
    ],
];
config\web\params... middleware stack  ... The RequestCatcherMiddleware::class has been moved out of input-http as indicated in the above parameterResolverInterface and into the middleware stack: 

'middlewares' => [
        ErrorCatcher::class,
        SentryMiddleware::class,
        SessionMiddleware::class,
        CookieMiddleware::class,
        CookieLoginMiddleware::class,
        Locale::class,
        Router::class,
        **RequestCatcherMiddleware::class**,                                  <---------------------------
]

I have been dealing with grids recently including filters on the grids and they are functioning beautifully. I have not accessed any of the functions mentioned in the error above although I shall be trying to do so and implement at least one of these functions in association with the grid. It would appear that this is an intialization error. When I do a composer update .... trying to get to the next stage of development ... I get the above error.

Fix yiisoft/data processors

All classes like Yiisoft\Yii\Cycle\Data\Reader\Processor\* are broken because there were changes in the yiisoft/data packages. Need to fix it

Better performance for RoadRunner

What steps will reproduce the problem?

When a big schema compiling

What is the expected result?

Create an ORM instance when running RR server once

What do you get instead?

Creates an ORM instance each request serving

Additional info

Invokeable factories used some core packages as well

Create specific NotFoundException and NotInstantiableClassException

Instead of using definitions and di packages, custom exceptions could be defined. That would:

  1. Give out more useful info when exception happens. Helps with debug.
  2. Lowers direct package dependencies number.
  3. Allows using any PSR-compatible DI container.

That should be better way to solve #122.

Fix Psalm

Need to fix Psalm issued before release.

Redesign configuration

The way to configure the package should be changed.

  • Follow fashion trends when vendor-name/package-name as key for config group
  • More simplicity and flexibility

`./vendor/bin/yii fixture/add` crashes

What steps will reproduce the problem?

$ git clone https://github.com/yiisoft/yii-demo.git
$ cd yii-demo
$ composer install
$ ./vendor/bin/yii serve

Go to index page. Then...

$ ./vendor/bin/yii fixture/add 20

What is the expected result?

No errors.

What do you get instead?


Warning: Uncaught Error in exception handling during call to Error::__tostring() in /home/ricardo/web/yii-demo/vendor/cycle/orm/src/Command/Traits/ContextTrait
.php on line 0

Call Stack:
    0.0001     412128   1. {main}() /home/ricardo/web/yii-demo/vendor/yiisoft/yii-console/bin/yii:0
    0.0001     412448   2. {closure:/home/ricardo/web/yii-demo/vendor/yiisoft/yii-console/bin/yii:12-87}() /home/ricardo/web/yii-demo/vendor/yiisoft/yii-consol
e/bin/yii:87
    0.1889   17802928   3. Yiisoft\Yii\Console\Application->run($input = NULL, $output = class Yiisoft\Yii\Console\Output\ConsoleBufferedOutput { private strin
g $buffer = ''; private ${Symfony\Component\Console\Output\ConsoleOutput}stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resou
rce(860) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = clas
s Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private ${Symfony\Component\Console\Output\ConsoleOutput}consoleSectionOutputs = []; private $
{Symfony\Component\Console\Output\StreamOutput}stream = resource(859) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; priva
te ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = FALSE; private $style
s = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /home/ricardo/web/yii-demo/vendor/yiisoft/yii
-console/bin/yii:80
    0.1931   17813864   4. Yiisoft\Yii\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = [0 => 'fixture/a
dd', 1 => '20']; private $parsed = []; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = [...]; private $req
uiredCount = 1; private $hasAnArrayArgument = FALSE; private $hasOptional = TRUE; private $options = [...]; private $shortcuts = [...] }; protected $stream = N
ULL; protected $options = []; protected $arguments = ['command' => 'fixture/add', 'count' => '20']; protected $interactive = TRUE }, $output = class Yiisoft\Yi
i\Console\Output\ConsoleBufferedOutput { private string $buffer = ''; private ${Symfony\Component\Console\Output\ConsoleOutput}stderr = class Symfony\Component
\Console\Output\StreamOutput { private $stream = resource(860) of type (stream); private ${Symfony\Component\Console\Output\Output}verbosity = 32; private ${Sy
mfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private ${Symfony\Component\Console\Outp
ut\ConsoleOutput}consoleSectionOutputs = []; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(859) of type (stream); private ${Symfony
\Component\Console\Output\Output}verbosity = 32; private ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\Output
Formatter { private $decorated = FALSE; private $styles = [...]; private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ..
. } } }) /home/ricardo/web/yii-demo/vendor/symfony/console/Application.php:166
    0.1973   18173368   5. Yiisoft\Yii\Console\Application->doRunCommand($command = class App\Command\Fixture\AddCommand { private Yiisoft\Yii\Cycle\Command\Cy
cleDependencyProxy $promise = class Yiisoft\Yii\Cycle\Command\CycleDependencyProxy { private Psr\Container\ContainerInterface $container = class Yiisoft\Yii\De
bug\Proxy\ContainerProxy { ... } }; private Faker\Generator $faker = class Faker\Generator { protected $providers = [...]; protected $formatters = [...] }; pri
vate array $users = [0 => class App\User\User { ... }, 1 => class App\User\User { ... }, 2 => class App\User\User { ... }, 3 => class App\User\User { ... }, 4 
=> class App\User\User { ... }, 5 => class App\User\User { ... }, 6 => class App\User\User { ... }, 7 => class App\User\User { ... }, 8 => class App\User\User 
{ ... }, 9 => class App\User\User { ... }, 10 => class App\User\User { ... }, 11 => class App\User\User { ... }, 12 => class App\User\User { ... }, 13 => class
 App\User\User { ... }, 14 => class App\User\User { ... }, 15 => class App\User\User { ... }, 16 => class App\User\User { ... }, 17 => class App\User\User { ..
. }, 18 => class App\User\User { ... }, 19 => class App\User\User { ... }, 20 => class App\User\User { ... }]; private array $tags = [0 => class App\Blog\Entit
y\Tag { ... }, 1 => class App\Blog\Entity\Tag { ... }, 2 => class App\Blog\Entity\Tag { ... }, 3 => class App\Blog\Entity\Tag { ... }, 4 => class App\Blog\Enti
ty\Tag { ... }, 5 => class App\Blog\Entity\Tag { ... }, 6 => class App\Blog\Entity\Tag { ... }, 7 => class App\Blog\Entity\Tag { ... }, 8 => class App\Blog\Ent
ity\Tag { ... }, 9 => class App\Blog\Entity\Tag { ... }, 10 => class App\Blog\Entity\Tag { ... }, 11 => class App\Blog\Entity\Tag { ... }, 12 => class App\Blog
\Entity\Tag { ... }, 13 => class App\Blog\Entity\Tag { ... }, 14 => class App\Blog\Entity\Tag { ... }, 15 => class App\Blog\Entity\Tag { ... }, 16 => class App
\Blog\Entity\Tag { ... }, 17 => class App\Blog\Entity\Tag { ... }, 18 => class App\Blog\Entity\Tag { ... }, 19 => class App\Blog\Entity\Tag { ... }, 20 => clas
s App\Blog\Entity\Tag { ... }]; private ${Symfony\Component\Console\Command\Command}application = class Yiisoft\Yii\Console\Application { private Psr\EventDisp
atcher\EventDispatcherInterface $dispatcher = class Yiisoft\Yii\Console\SymfonyEventDispatcher { ... }; private ${Symfony\Component\Console\Application}command
s = [...]; private ${Symfony\Component\Console\Application}wantHelps = FALSE; private ${Symfony\Component\Console\Application}runningCommand = ...; private ${S
ymfony\Component\Console\Application}name = 'Yii Console'; private ${Symfony\Component\Console\Application}version = '3.0'; private ${Symfony\Component\Console

Additional info

Q A
Version HEAD
PHP version PHP 7.4.13 (cli) (built: Nov 28 2020 06:24:59) ( NTS )
Operating system Ubuntu 20.04.1 LTS

Make FromFile(s)SchemaProvider secure

It would be great to make the schema providers from the php file more secure.
Should we include preliminary parsing of the php file before include/require to make sure there is no potentially malicious code?
Or is it better to look towards more secure formats like json or yaml?

Make EntityManager resetable

Need to fix container confg to autoreset EntityManager for demonized apps

To reset EM, \Cycle\ORM\EntityManager::clean() should be called.

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.