Giter Club home page Giter Club logo

Comments (4)

someplace53 avatar someplace53 commented on July 24, 2024 1

Okay, I introduced some bugs, but they should now be fixed. Some errors remain or might be in the current version:

  • event for beforeFolderCopied had a bug, which did not calculate the quota correctly (this should be a bug in the current version too), but was easily fixed
  • event for beforeFileReplaced shows an exception instead of the error message, but works otherwise
  • event for afterFileMoved did not update the source quota, fixed in my fork, but remains in the current version
  • event for afterFolderCopied does not update the quota and I have no idea why

Some events I am not sure how to test, as they imho should not change the quota (moveFolder, rename).

I hope this is helpful

from typo3-fal-quota.

someplace53 avatar someplace53 commented on July 24, 2024

Not sure why I have not seen this issue before, but I created a fork where I switched to EventDispatcher. I mostly copied and reorganized the code. There are a few things which should probably change (e.g. the ResourceStorageException namespace) and I am open to suggestions. I only tested some basic functions, but it seems to work.

I did not change the NotifyCommand as I do not know why you are calling the Dispatcher there (I have never worked with signals and slots)

The switch from Command.php to Service.yaml should be easy as you are already using symphony commands. You need just add something like the following to the Service.yaml:

services:
  Mehrwert\FalQuota\Command\NotifyCommand:
    tags:
      - name: 'console.command'
        command: 'falquota:notifycommand'
        description: 'notify users for quota'
        hidden: false
        schedulable: true
  Mehrwert\FalQuota\Command\UpdateCommand:
    tags:
      - name: 'console.command'
        command: 'falquota:updatequota'
        description: 'update quota'
        hidden: false
        schedulable: true

The commands should now be listed as part as "Execute console command" in the scheduler

from typo3-fal-quota.

someplace53 avatar someplace53 commented on July 24, 2024

The bugs mentioned above should be fixed. From my perspective this is done and I am already using it.

Should I create a pull request or what would you prefer?

from typo3-fal-quota.

tstahn avatar tstahn commented on July 24, 2024

Hi @someplace53, thanks for your effort! Please feel free to create a PR.

from typo3-fal-quota.

Related Issues (20)

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.