This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 168497 - php tags in yaml should be ignored during syntax checking
Summary: php tags in yaml should be ignored during syntax checking
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Symfony (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 16:48 UTC by humphrey
Modified: 2009-09-04 13:31 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description humphrey 2009-07-13 16:48:25 UTC
<?php echo 'foo'; ?>

mykey:
  foo: bar

this throws "Null: we had this expected <document start>, but found org.jvyamlb.tokens.PositionedBlockMappingStartToken"
on the "mykey" line for syntax handling

important for symfony yaml support in 6.8, since the sfyaml library is the most widely used yaml library
Comment 1 Tomas Mysik 2009-07-15 14:35:42 UTC
Since it is not a valid YAML file, changing to an enahncement but agreed that it would be really nice to have.

Petre, could you please try to estimate how much work it would be? Thanks a lot.
Comment 2 Petr Pisl 2009-07-15 17:59:55 UTC
The first things is how to recognize that a yaml file contains php? Does have these files a special extension? I'm
thinking from mimeresolver point of view. 

If we will be able to know that there is a php inside the file, than it can be handled as a yaml+php mimetype and there
shouldn't be so much work. 
Comment 3 Tomas Mysik 2009-07-16 08:38:44 UTC
Unfortunately not - just ordinary extension but with PHP blocks inside. Example:

----- %< -----
<?php for ($i = 100; $i <= 130; $i++): ?>
  job_<?php echo $i ?>:
    JobeetCategory: programming
    company:      Company <?php echo $i."\n" ?>
    position:     Web Developer
    location:     Paris, France
    description:  Lorem ipsum dolor sit amet, consectetur adipisicing elit.
    how_to_apply: |
      Send your resume to lorem.ipsum [at] company_<?php echo $i ?>.sit
    is_public:    true
    is_activated: true
    token:        job_<?php echo $i."\n" ?>
    email:        job@example.com

<?php endfor; ?>
----- %< -----
Comment 4 Petr Pisl 2009-09-03 16:15:29 UTC
I have fixed this and add php coloring into yaml files. 

Change 9f6af654bb01.
Comment 5 hansbrix 2009-09-03 16:39:22 UTC
great, thanks for the fix, much appreciated!
Comment 6 Quality Engineering 2009-09-04 13:31:02 UTC
Integrated into 'main-golden', will be available in build *200909040632* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9f6af654bb01
User: Petr Pisl <ppisl@netbeans.org>
Log: #168497 - http://www.netbeans.org/issues/show_bug.cgi?id=168497

Now only php lexer works in yaml files. There are not still available other php editor features like cc.