Problem/Motivation

I'm working on this: #2380389: Use a single vendor directory in the root

It won't pass the testbot because I want to move the Composer-managed vendor directory from core/vendor/ to vendor/.

This means the testbot's lint of changed files fails the test, because it's ignoring the wrong directory.

This issue follows on to this one: #1565094: Remove "vendor" directory from PHP syntax check to avoid PHP 5.4 errors

Proposed resolution

Have the testbot lint ignore both core/vendor/ and vendor/.

Remaining tasks

User interface changes

API changes

Comments

mile23’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

A patch.

My regex-fu isn't so good so there may be a better way to do this.

mile23’s picture

Issue tags: +Composer
joelpittet’s picture

StatusFileSize
new1.06 KB

Here's some fu for you;)

http://3v4l.org/n3ZfN

mradcliffe’s picture

Regex makes sense to me.

+++ b/review/drupal/pifr_drupal.client.inc
@@ -172,13 +172,13 @@ class pifr_client_review_pifr_drupal extends pifr_client_review {
+    // non-Drupal code  which we do not want to run through coder, and

There's an extra space between "code" and "which", but that's not a big deal.

"php" should be capitalized if I recall correctly.

mile23’s picture

StatusFileSize
new1.06 KB

@joelpittet #3: That 3v4l snippet works once you change the array declaration. :-)

Fixed the comment problems.

If we can get a commit here, then we can have one vendor directory, and then we can have modules specifying dependencies without all kinds of crazy workarounds.

hussainweb’s picture

+++ b/review/drupal/pifr_drupal.client.inc
@@ -172,13 +172,13 @@ class pifr_client_review_pifr_drupal extends pifr_client_review {
+    // potentially contains PHP 5.4 code which will not pass the syntax check.

Isn't it PHP 5.5 code that makes it fail? IIRC, the error that caused the tests to fail was Guzzle's use of PHP 5.5 in some places.

bojanz’s picture

Let's just remove the exact version ("potentially contains PHP code which will not pass the syntax check"). We can update it to say "5.5" but that too will be weird once we raise our requirement to 5.5 and the libraries include some other >5.5 code.

mile23’s picture

StatusFileSize
new1.06 KB

OK. How's that?

hussainweb’s picture

I think that is still inaccurate. We are already using PHP 5.4 code in Drupal 8 core and the executable works fine with that. The testbot fails with Guzzle as some of the files use PHP 5.5 keywords/operators (I can't remember what exactly). Normally, that class in Guzzle is optional and loaded only if PHP 5.5 is available and we don't have a problem when actually running or testing Drupal 8.

The message should say that we are just skipping syntax checks for all the files in (core/)?vendor/ directory as that is not our code anyway.

mile23’s picture

StatusFileSize
new1.08 KB

OK. :-)

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

+1 this makes sense.

Mixologic’s picture

Status: Reviewed & tested by the community » Fixed

LGTM as well. Committed and pushed.

  • Mixologic committed 338ef57 on 6.x-3.x authored by Mile23
    Issue #2460991 by Mile23, joelpittet: Ignore root level vendor/ during...
mile23’s picture

Thanks so much. :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.