Closed (fixed)
Project:
High contrast
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Feb 2020 at 12:36 UTC
Updated:
25 Mar 2020 at 18:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
edemidenko commentedComment #3
edemidenko commentedComment #4
amateichuk commenteduse Drupal\Core\File\FileSystemInterface; - Don't used in file
string: catch (FileException $e) - expect
use Symfony\Component\HttpFoundation\File\Exception\FileException;
Comment #5
edemidenko commentedUpdated -> changed to use Symfony\Component\HttpFoundation\File\Exception\FileException;
Comment #6
neograph734Thanks for the work so far, but I am not yet entirely happy with the service usage within the class. It should be defined in
high_contrast.services.ymlinstead.Please review attached patch.
Comment #7
hkirsman commentedSounds like a good idea. Just curious, is there any performance reasons or it's just how it's meant to work if service has been defined?
There is 1 missing space that is bugging me but that's just me https://git.drupalcode.org/project/high_contrast/blob/8.x-1.x/high_contr... :)
Comment #8
hkirsman commentedComment #10
neograph734I think (but I am far from a Symfony expert) that it helps to reduce the amount of instantiated classes and thus memory usage. By reusing classes and listing all their dependencies they can be loaded in the right order and the same FileSystem class can be reused across all modules. So I think it helps in reducing memory usage. (A 1:1 replacement like this one won't make much of a difference, but it is good to stick to conventions anyway)
I have corrected the space as well :)
Comment #11
pifagor commentedComment #12
pifagor commentedComment #13
neograph734Unassigning edemidenko. Thanks all for the help.
Comment #15
avpaderno