Giter Site home page Giter Site logo

skyfoxvn / propelbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from propelorm/propelbundle

7.0 7.0 10.0 1.86 MB

PropelBundle for Symfony.

Home Page: http://propelorm.org/Propel/documentation/#working-with-symfony2

PHP 96.46% Twig 3.54%

propelbundle's People

Contributors

aklinkert avatar arffak avatar big-shark avatar cedriclombardot avatar cristianoc72 avatar danchodimitrov avatar didipeut avatar gharlan avatar havvg avatar iceshack avatar johnarevalo avatar k-phoen avatar kingchills avatar krichprollsch avatar lbarulski avatar leoontheearth avatar marcj avatar mwaterboehr avatar nibsirahsieu avatar nicolas-grekas avatar oujesky avatar peter17 avatar petrocki avatar rayrigam avatar skyfoxvn avatar tacman avatar wimwinterberg avatar xynnn avatar ylazarov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

propelbundle's Issues

SQLSTATE[08004] [1040] Too many connections in a batch of functional tests

PHPUnit tests fail after the first ~200 tests with SQLSTATE[08004] [1040] Too many connections.
Each api call will trigger a full Symfony boot sequence, including PropelBundle's boot function, which creates a new connection each time, until the limit is reached.

I assumed, that Propel's ConnectionManagerSingle should close existing connections when new configuration is provided (ConnectionManagerSingle::setConfiguration()) by detaching connection objects. If nobody uses them, objects are destroyed, connections are closed. But not...

In Propel1 there was a !\Propel::isInit() function, this was used in PropelBundle to avoid multiple connection instances, but this has been removed, and the Propel::init() is also deprecated.

I reported this problem for Propel guys, but no answer till now (propelorm/Propel2#1906).

I managed to avoid this problem by emulating Propel1's behaviour by having

    private static $isInitialized = false;

    /**
     * {@inheritdoc}
     */
    public function boot(): void
    {
        try {
            if (!self::$isInitialized) {
                $this->configureConnections();

                if ($this->container->getParameter('propel.logging')) {
                    $this->configureLogging();
                }

                self::$isInitialized = true;
            }
        } catch( \Exception $e ) {
        }
    }

in PropelBundle, but I'm not convinced that this is the correct solution.

(Symfony 5.4.18, PHP 8.0.24, MySQL 5.7, PHPUnit 9.3.11)

Propel entries missing from profiler if APP_DEV is on

The "Propel" section of the Symfony profiler is inactive, because connection is not in debug mode.

I attempted to fix it by adding

if ($this->container->getParameter('kernel.debug')) {
    $connection->useDebug(true);
}

in PropelBundle::configureLogging() to both read and write connections. This worked fine whith browser request, Propel queries appeared correctly in profiler, but caused a huge memory leak when executing queries in phpunit tests. In Propel's ConnectionWrapper::callUserFunctionWithLogging() both $callback(...$args); and $this->log($sqlForLog); increased memory usage by 17K for each query.

(Symfony 5.4.18, PHP 8.0.24, MySQL 5.7, PHPUnit 9.3.11)

Great job by fixing up PropelBundle btw! Really appreciate it!

Form\Type\ModelType.php refactoring

line - 209 to 230
research and refactoring(if needed) need to be done because this part of code look useless at this point because its doing same as ChoiceType/ModeType option "choice_label"

replace fzaninotto/faker

fzaninotto/faker its deprecated from some time ago and some of the functions/syntax in the code dosant exists anymore and in result of this unit tests fails(github actions)

"Database map was not initialized. Please check the database loader script included by your conf" error.

After updating to 294de32 of propelorm/Propel2 (integration of PR #1742), I'm getting a "Database map was not initialized. Please check the database loader script included by your conf" error in a Symfony 4.4 application using PropelBundle. After (manually) including the loadDatabase.php script generated by model:build in PropelBundle::configureConnections() (line 59), it seems to work. As far as I understood PR #1742 of propelorm/Propel2, the problem is that the loader script generated by model:build is never included/required with PropelBundle.

Please tag current versions

Hi @SkyFoxvn

Would you mind create a 5.0.2 tag on the current version of the 5.0 branch?

And also a 6.0.0 tag on the current version of the 6.0 branch?

Thanks a lot. Best regards

Dependency upgrade for Symfony 6

Hello,

Can you update the dependency: "propel/propel" to "2.0.0-beta2"?

Indeed, I cannot install your library because of a version conflict of symfony/yaml used by propel.

Thanks!

UsernameNotFoundException class no longer exists since Symfony 5

Hello,

In "PropelBundlePropelBundleSecurityUserPropelUserProvider", the "UsernameNotFoundException" class no longer exists. It has been replaced by "UserNotFoundException".

Can you update your bundle?

For information, github prevents me to fork your bundle because I already forked an old PropelBundle, so I can't make a pull request.

Thank you.

Propel\Runtime\Connection\ConnectionManagerSingle::__construct not compatible with propel 2.0.0-beta2

I've just found another issue with 5.0.1 and beta2 so adding it here for you
Error: Uncaught ArgumentCountError: Too few arguments to function Propel\Runtime\Connection\ConnectionManagerSingle::__construct(), 0 passed in /var/www/vendor/skyfox/propel-bundle/PropelBundle.php on line 81 and exactly 1 expec ted in /var/www/vendor/propel/propel/src/Propel/Runtime/Connection/ConnectionManagerSingle.php:37

Non-existent service "profiler"

Firstly many thanks for this fork of PropelBundle!

After installation and clearing cache I got the following error:

In ContainerBuilder.php line 1030:
                                                         
  You have requested a non-existent service "profiler".  

I found that "services_dev.yml" is loaded and that it tried to use the "profiler"-service. I didn't had the profiler installed, thus I was confronted with the exception. As a workaround I installed symfony/profiler-pack, but maybe a check can be added to see if the profiler is installed before loading "services_dev.yml"?

Configuration::addPathsSection() not compatible with propel 2.0.0-beta2

Thanks for forking this bundle and keeping it current.

I'm using it to migrate a large legacy project from SF3 to SF4 then onwards. I am having to use v5.0.1 but I am having an issue:
`Fatal error: Declaration of Propel\Bundle\PropelBundle\DependencyInjection\Configuration::addPathsSection(Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node) must be compatible with Propel\Common\Config\Propel
Configuration::addPathsSection(Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node): void in /var/www/vendor/skyfox/propel-bundle/DependencyInjection/Configuration.php on line 32

addPathsSection
addRuntimeSection
addDatabaseSection

all need a return type of 'void' according to propel/propel 2.0.0-beta2

`
It look's like it should be a simple fix, is this something you can help with or would you like me to submit a PR? I don't have much time on this topic, so it would be great to hear back one way or another

Dependency upgrade to propel 2.0.0-beta3

Can you please update the "propel/propel" dependency from "2.0.0-beta2" to "2.0.0-beta3" (at least for the 5.1 and 6.0 branch)? The beta3 contains some interesting enhancements (e.g. Monolog V3 support) and fixes.

Thanks.

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.