Coder Social home page Coder Social logo

backend's Issues

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateTaxController.php, line 77

in src/Controller/CalculateTaxController.php, line 77

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

            $taxHistory->setTaxValue($taxCalculator->calculateTax($payroll));

            $manager->persist($taxHistory);

            if (0 === $key % 17) {
                $manager->flush();
            }
        }

        $manager->flush();

Posted from SensioLabsInsight

Apakah predis menjadi require

Coba install sesuai dengan yang di README, saat jalankan command php bin/console doctrine:schema:update --force muncul error berikut

[Predis\Connection\ConnectionException]    
  Connection refused [tcp://localhost:6379]

Apakah memang harus menggunakan redis? apabila iya mungkin bisa ditambahkan di README,

OS pakai Linux Mint 18 dengan PHP 7.1.7-1+ubuntu16.04.1+deb.sury.org+1

Security Issue

Hi @ad3n

Your parameters_prod.yml file has been compromised and your login/pwd are now visible on this this project
to remove it from your history:
https://help.github.com/articles/removing-sensitive-data-from-a-repository/

Change your login/pwd on all your projects...

I recommand you also to use a gitignore file on the root of your Symfony project:
https://github.com/github/gitignore/blob/master/Symfony.gitignore
This will automatically ignore your parameters.yml file, your vendors ...

I also recommand you to plug your open source symfony project to sensioInsight...It's free and help you find all security, performance or quality issue on each commit

https://insight.sensiolabs.com/

Hope this will help you :)

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateOvertimeController.php, line 74

in src/Controller/CalculateOvertimeController.php, line 74

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

            $overtimeHistory->setOvertimeMonth($month);
            $overtimeHistory->setCalculatedValue($overtimeCalculator->calculate($date, $employee));

            $manager->persist($overtimeHistory);
            if (0 === $key % 17) {
                $manager->flush();
            }
        }

        $manager->flush();

Posted from SensioLabsInsight

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateSalaryController.php, line 101

in src/Controller/CalculateSalaryController.php, line 101

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

                $payrollDetail->setBenefitValue($benefit['value']);
                $payrollDetail->setBenefitType(BenefitInterface::TYPE_PLUS);

                $manager->persist($payrollDetail);
                if (0 === $k % 17) {
                    $manager->flush();
                }
            }

            foreach ($salaryCalculator->getMinusBenefits($employee) as $i => $benefit) {
                if ($existDetail = $payrollDetailRepository->findByPayrollAndBenefit($payroll, $benefit)) {

Posted from SensioLabsInsight

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateSalaryController.php, line 219

in src/Controller/CalculateSalaryController.php, line 219

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

            $payrollDetail->setBenefitValue($benefit['value']);
            $payrollDetail->setBenefitType(BenefitInterface::TYPE_PLUS);

            $manager->persist($payrollDetail);
            if (0 === $k % 17) {
                $manager->flush();
            }
        }

        foreach ($salaryCalculator->getMinusBenefits($employee) as $i => $benefit) {
            if ($existDetail = $payrollDetailRepository->findByPayrollAndBenefit($payroll, $benefit)) {

Posted from SensioLabsInsight

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateSalaryController.php, line 237

in src/Controller/CalculateSalaryController.php, line 237

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

            $payrollDetail->setBenefitValue($benefit['value']);
            $payrollDetail->setBenefitType(BenefitInterface::TYPE_MINUS);

            $manager->persist($payrollDetail);
            if (0 === $i % 17) {
                $manager->flush();
            }
        }

        $manager->flush();

Posted from SensioLabsInsight

Error PayrollPeriodRepository.php line 14

Saya coba composer install. setelah itu melakukan konfigurasi, setelah itu muncul error seperti berikut ini

FatalErrorException in PayrollPeriodRepository.php line 14:
Compile Error: Declaration of Persona\Hris\Repository\ORM\PayrollPeriodRepository::inactiveOthers(Persona\Hris\Salary\Model\PayrollPeriodInterface $payrollPeriod): Persona\Hris\Repository\ORM\void must be compatible with Persona\Hris\Salary\Model\PayrollPeriodRepositoryInterface::inactiveOthers(Persona\Hris\Salary\Model\PayrollPeriodInterface $payrollPeriod): Persona\Hris\Salary\Model\void

[Insight] The EntityManager should not be flushed within a loop - in src/…/CalculateSalaryController.php, line 119

in src/Controller/CalculateSalaryController.php, line 119

Calling flush is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should avoid flushing inside a loop.

                $payrollDetail->setBenefitValue($benefit['value']);
                $payrollDetail->setBenefitType(BenefitInterface::TYPE_MINUS);

                $manager->persist($payrollDetail);
                if (0 === $i % 17) {
                    $manager->flush();
                }
            }

            if (0 === $key % 17) {
                $manager->flush();

Posted from SensioLabsInsight

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.