Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NS to demos #1200

Merged
merged 22 commits into from
Jun 2, 2020
Merged

Add NS to demos #1200

merged 22 commits into from
Jun 2, 2020

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented May 16, 2020

fix #1199

Needed even if there is no autoloading on these, CS fixer otherwise behave differently without NS (and PHP too, as leading \ is not required otherwise for absolute names)

@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #1200 into develop will decrease coverage by 1.57%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1200      +/-   ##
=============================================
- Coverage      72.18%   70.61%   -1.58%     
  Complexity      2559     2559              
=============================================
  Files            130      130              
  Lines           6271     6271              
=============================================
- Hits            4527     4428      -99     
- Misses          1744     1843      +99     
Impacted Files Coverage Δ Complexity Δ
src/Console.php 82.48% <ø> (ø) 46.00 <0.00> (ø)
src/FormLayout/Section/Accordion.php 60.00% <ø> (+60.00%) 5.00 <0.00> (ø)
src/FormLayout/Section/Columns.php 100.00% <ø> (+100.00%) 1.00 <0.00> (ø)
src/FormLayout/Section/Generic.php 100.00% <ø> (ø) 1.00 <0.00> (ø)
src/FormLayout/Section/Tabs.php 100.00% <ø> (+100.00%) 1.00 <0.00> (ø)
src/Loader.php 95.83% <ø> (ø) 10.00 <0.00> (ø)
src/View.php 85.71% <ø> (ø) 172.00 <0.00> (ø)
src/FormLayout/Custom.php 0.00% <0.00%> (-83.34%) 3.00% <0.00%> (ø%)
src/FormField/MultiLine.php 0.00% <0.00%> (-35.55%) 126.00% <0.00%> (ø%)
src/TableColumn/Status.php 76.47% <0.00%> (-5.89%) 12.00% <0.00%> (ø%)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e0cf1...8487dfa. Read the comment docs.

@mvorisek
Copy link
Member Author

mvorisek commented May 16, 2020

@ibelar, hi, you were refactoring these week or two ago... Can you check the changes and resolve the class names with the current CS settings?

I think you there are only two options

  • extend the classes anonymously like $cl = new class() extends XXX {}; (so no need for actual/new class name)
  • move them to a separate and equally names files

Then this PR is complete.

@DarkSide666 DarkSide666 marked this pull request as ready for review June 2, 2020 13:24
Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvorisek please fix conflicts and then it's ready to merge.

@DarkSide666
Copy link
Member

Not everything was finished here, but let's merge this in and if needed create new PR with additional changes in demo scripts.

@DarkSide666 DarkSide666 merged commit 0c1711b into atk4:develop Jun 2, 2020
@romaninsh
Copy link
Member

@mvorisek - this did make demos harder to read. Their purpose was to teach others how to use features - but with anonymous classes it is a non-standard approach.

another consideration could be to assign dynamic classes into objects (drop get_class).

@mvorisek
Copy link
Member Author

mvorisek commented Jun 2, 2020

@romaninsh this is needed for CS to work - the only option is to separate the classes with proper autoloading.

@mvorisek mvorisek deleted the fix_demos_ns branch June 2, 2020 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add some NS to demos
3 participants