Skip to content

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented May 16, 2018

This PR has 2 changes:

  • upgrade nette/tester to v2.0
  • allow to use own Compiler with no defined macros

@f3l1x
Copy link
Member Author

f3l1x commented May 16, 2018

Ou shit, nette/tester v2.0 requires >=5.6. My mistake.

composer.json Outdated
},
"require-dev": {
"nette/tester": "~1.7",
"nette/tester": "^2.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

Please leave 1.7, it must work with PHP 5.4

Copy link
Member Author

Choose a reason for hiding this comment

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

Yop, my mistake.


$macroHandlers = new \SplObjectStorage;
array_map([$macroHandlers, 'attach'], call_user_func_array('array_merge', $this->macros));
array_map([$macroHandlers, 'attach'], $this->macros ? call_user_func_array('array_merge', $this->macros): []);
Copy link
Member

Choose a reason for hiding this comment

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

Why is it needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Exited with error code 255 (expected 0)
   E_WARNING: array_merge() expects at least 1 parameter, 0 given

@f3l1x f3l1x force-pushed the feature/no-macros branch from e8475ee to 85fd271 Compare May 16, 2018 10:07
$macroHandlers = new \SplObjectStorage;
array_map([$macroHandlers, 'attach'], call_user_func_array('array_merge', $this->macros));

if ($this->macros) {
Copy link
Member

Choose a reason for hiding this comment

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

Is condition needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, it triggers

Exited with error code 255 (expected 0)
   E_WARNING: array_merge() expects at least 1 parameter, 0 given

Copy link
Member

Choose a reason for hiding this comment

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

Ok, good.

@dg
Copy link
Member

dg commented May 16, 2018

Please fix coding style errors and I'll merge it.

@f3l1x f3l1x force-pushed the feature/no-macros branch from 85fd271 to 631fff5 Compare May 16, 2018 11:20
@f3l1x
Copy link
Member Author

f3l1x commented May 16, 2018

Thanks.

@f3l1x f3l1x force-pushed the feature/no-macros branch from 631fff5 to 8ac6a71 Compare May 16, 2018 11:25
@dg dg merged commit 6596b79 into nette:v2.4 May 16, 2018
dg pushed a commit that referenced this pull request May 16, 2018
dg pushed a commit that referenced this pull request May 17, 2018
dg pushed a commit that referenced this pull request Jun 3, 2018
dg pushed a commit that referenced this pull request Oct 6, 2018
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.

2 participants