Shannon Bailey joined Wikimedia Foundation to work on Parsoid and related technology.

Shannon wrote two programming languages and worked on many other products over three decades.

Shannon hopes to further the global reach of Wikipedia through offline readers and innovate on bringing IOT data into Wikipedia for weather, energy and other machine information

sources.


The following narrative and hopefully helpful hints about using a MacBook pro with PHPStorm to develop mediawiki core, parsoid and extensions is in progress, capturing notes of the two phases (sperated by two years), of initial installation efforts and challenges, and my recent wrestling match when upgrading PHP, Xdebug, nginx and core/VE.

WORK IN PROGRESS...

Issues installing and maintaining mediawiki, VE and parsoid locally as a developer on OS/XEdit

As a developer working primarily on Parsoid, but needing to have a full core mediawiki installation with VE and other extensions, I've had some challenges getting a stable and complete installation of the mostly complete mediawiki stack going a couple of years ago. The initial installation had its frustrating moments, and each time I upgrade OS/X, something will be broken as a result of the upgrade, and I'll have to track down and figure out what changed.

My machine is a 2014 Macbook Pro currently running Catalina (as of March 2021). Back two years ago, Arlo helped me expand my installation from just having Javascript Parsoid and related test environment installed, to having a full core and VE installation running on my local machine. I like IDE's, much nicer than what I had to use back in the DOS and early Windows 3.0 days, and so I had WebStorm installed and working well for javascript development on Parsoid. Once we installed mediawiki core, and began the port of Parsoid from Javascript to PHP, I switched over the PHPStorm (which has good Javascript support as well).

The first challenge I faced was getting an appropriate version of PHP installed, and a matching version of XDebug to work properly with PHPStorm. You would think that JetBrains would have getting a debugging working under PHPStorm dialed in, but alas, getting XDebug installed and configured properly to work with PHPStorm can require a fair bit of research and hacking as the JetBrains help and web site, is umm, not that helpful.

The second challenge was getting the nginx web server installed and configured properly to work with my PHP installation, and not the one OS/X ships with. With installation of VE and Vector skin, and localSettings.php with the right directives, and nginx.conf with the right configuration, and PHP's php.ini setup correctly, and PHPStorm configured with the right setting for Xdebug and, well the first time around that was mostly all that needed to be done on High Sierra (I currently run Catalina, and am not ready to upgrade to Big Sur).

Recently though it wasn't upgrading OS/X that bit me, it was mediawiki cores need for me to switch to PHP 7.4.15 after I refreshed my repo from master after many months of leaving well enough alone. So without thinking too much hassle would ensue, I did a Brew update, which upgraded nginx and a bunch of other packages. Upgrading PHP of course broken Xdebug as the one I now had installed no longer worked with 7.4.15 not being built with that versions header files, etc. So I began researching how to get a matching Xdebug version installed. The web site for Xdebug has prebuilt executables for Windows, but not for Mac. Instructions on how to get a matching Xdebug were varied, but eventually I got pecl to run (required recent version of XCode with command line tools installed which I happen to keep installed), but then the compile failed and a bit of research turned up the fix in: https://stackoverflow.com/questions/64321231/pecl-extension-compile-error-for-php-7-4-on-macos

In file zend_operators.h you have to change a 1 to 0

#if defined(HAVE_ASM_GOTO) && !__has_feature(memory_sanitizer)
# define ZEND_USE_ASM_ARITHMETIC 0  // STB - 03-02-2021 changed 1 to 0 as a fix for xdebug compile
#else
# define ZEND_USE_ASM_ARITHMETIC 0
#endif

which then allowed pecl to succeed.

$ pecl install xdebug



Test Wikitext Playground area (ignore, I just use this area for Parsoid test and verification)Edit

Reference 0. [upper-alpha 1]

Reference 1.Template:Efn-ua More text following reference 1. Another reference 2. Template:Efn-ua Additional text following footnote 2.

Reference 3. [lower-greek 1]

Template:Notelist-ua

  1. Reference 0
  1. Reference 3 Greek.

Previous Test CasesEdit

[1][2]

  1. example
  2. example


test linefeed[1]

  1. testLinefeedRef


test[1]

blah[1]

test2[2]

blah2[2]

  1. a b asdf
  2. a b qwer


Test Wikitext areas MINUS ONE :-)Edit

PRE [1] THEVALUE Cite error: Invalid <ref> tag; name cannot be a simple integer. Use a descriptive title POST [2] GROUP [noreference 1]

  1. preValue
  2. postValue

Test Wikitext area ZEROEdit

1 [1] 2 [1]

  1. a b 1

Additional Wikitext test area ONEEdit

Cite error: Invalid dir="nonsense", must be ltr or rtl Cite error: Invalid dir="", must be ltr or rtl


Additional Wikitext test area TWOEdit

[1][1]

  1. a b content

AA [a 1] BA [b 1] CA [c 1] BB [b 2] FBA FAA FBB FCA

  1. group_b_name_a group_b_follow_a
  2. group_b_name_b group_b_follow_b
  1. group_c_name_a group_c_follow_a
  1. group_a_name_a group_a_follow_a

Additional Wikitext test area THREEEdit

ADD[1] SUB[1] MUL MOD

  1. a b theFollowValue anotherFollowValue Cite error: Invalid <ref> tag; name "theName" defined multiple times with different content

older testsEdit

CONGREGATI
EX TOTO ORBE
MATHEMATICI


Wikitext PlaygroundEdit

  1. List item #1
  2. List item #2

Subheading #1Edit

TABLE #1
A B
1 A1
2 B2

THIS IS JUST BOLD TEXT

indented one level
indented two levels

COMPUTER CODE ≠≤≥~←→

  • Bullet #1
  • Bullet #2
    • Sub Bullet #2a


text1  text2
text1  text2
text2

PHP section=1Edit

PHP section=2Edit

PHP section=3Edit

PHP section=4Edit


Cite error: <ref> tags exist for a group named "noreference", but no corresponding <references group="noreference"/> tag was found