On local machine I'm using Drush 7.0-dev
OS X Mavericks

I installed Drush SQL Sync Pipe by running:

$ drush dl drush_sql_sync_pipe --destination=$HOME/.drush
Project drush_sql_sync_pipe (7.x-1.3) downloaded to /Users/XXXX/.drush/drush_sql_sync_pipe.

Cleared caches:

$ drush cache-clear drush
'drush' cache was cleared.

And tried to sync database from Pantheon to local:

$ drush sql-sync-pipe @pantheon.kokous.dev @self --strict=0

And got this ERROR:

Drush command terminated abnormally due to an unrecoverable error.                                           [error]
Error: Call to undefined function pm_parse_project_version() in
/Users/XXXX/.drush/drush_sql_sync_pipe/update.inc, line 78

Any ideas?

Comments

jerseycheese’s picture

Ever get anywhere with this? I'm hitting the same wall.

johntr’s picture

Getting the same problem with Yosemite. Also on Drush 7.0-dev.
What seemed to have worked is checking out a different version of drush using git. It seems like the latest stable version of drush is 6.5.0 works.
You can navigate to your drush directory and do a git checkout 6.5.0 that should switch you to the correct version. If aren't using git you can download it from http://www.drush.org/en/master/install/ . Hope that works!

nickgs’s picture

I did a little digging here. There have been some API changes in the master branch of Drush. As for the pm_parse_project_version function it looks to be removed as outlined at the link below:

https://github.com/drush-ops/drush/pull/870

I began playing with a patch but quickly started hitting other API changes... such as the removal of drush_sql_empty_db from within the sql.drush.inc file. I have been unable find any documentation on this change.

Not sure if it makes sense to move forward with a patch until a stable 7.x branch is created.

For now it looks like @johntr's solution is working.

markhalliwell’s picture

Status: Active » Postponed

Agreed, that is partially why I haven't responded yet to this issue or put a lot of effort into fixing this. I am waiting for a final 7.0 release for drush. When I am dealing with 8.x sites, I just switch to Drush 7 and use the normal sql-sync for now. When I'm on D7 sites, I use Drush 6. The following is what I use to quickly switch between different versions of Drush:

Drush 5 (D6/D7)

composer global require drush/drush:5.*

Drush 6 (D6/D7)

composer global require drush/drush:6.*

Drush 7 (D6/D7/D8)

composer global require drush/drush:dev-master

For a specific commit hash:

composer global require drush/drush:dev-master#8cbee6588b41e44ab707e77c88a407bee89b58d9
markhalliwell’s picture

Title: Error: Call to undefined function pm_parse_project_version() in ~/.drush/drush_sql_sync_pipe/update.inc, line 78 » Fix for Drush 7
Version: 7.x-1.3 » 7.x-1.x-dev
Category: Bug report » Task
colan’s picture

Title: Fix for Drush 7 » Drush 7: Call to undefined function pm_parse_project_version()
Category: Task » Bug report

Setting the title to something more descriptive.

markhalliwell’s picture

Title: Drush 7: Call to undefined function pm_parse_project_version() » Fix for Drush 7

There is more than just one undefined function that needs to be fixed/worked around to get it working in Drush 7, hence why I changed it to this title in the first place.

markhalliwell’s picture

Version: 7.x-1.x-dev » 7.x-2.0
Status: Postponed » Fixed

drush_sql_sync_pipe-7.x-2.0 has been released, file new issues if you encounter anything.

Status: Fixed » Closed (fixed)

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